the fact that it was close was more luck than anything...
the place where you set the slider's position - you were including BrowserSliderMainPart.Height but its height is zero because you replaced it with 9patchSlider.
the first part of that calculation (scrolly-(1080/2))/LayoutHeight) only works out to 0 to 0.5 because scrolly goes from 540 to 1620. to get it to go from 0 to 1, either multiply that result by 2, or change it to (scrolly-(1080/2))/1080)
but that assumes the layout height will always be 2160. If you want the scrollable area to be variable, it gets a little trickier. Either you have to change the canvas size as required, or use unbounded scrolling and manually control where scrolly starts and stops.
the second part of the above calculation needs to factor in the height of 9patchSlider, so the over-all calculation would be something like:
(((scrolly-(1080/2))/LayoutHeight)*2*((1080-9patchSlider.Height)-179))+179
or
(((scrolly-(1080/2))/1080)*((1080-9patchSlider.Height)-179))+179
Billions of thanks! It is so hard to detect mistakes in own code. It works real perfect when layoutHeight = 2160. But I don`t understand what to do to make this formula universal for any layout height. I have fixed mistake with height(don`t know how I didn`t notice it), but multiply by 2 works only for current layout height. I think it should be a kind of proportion to deal normally with every situation.
Deviding in 1080 also works only for 2160 px height of layout.
So, have you any ideas to upgrade this formula to work normaly with any layoutHeight, AllanR?
I have also tried to replace '*2' with 'LayoutHeight/1080' to make a universal proportion, but it also works only for current size of layout.
Updated project: drive.google.com/file/d/1XskHi_f3cqp5Z7d4K2z4Mxtj5SCouv-I/view