mardi 16 août 2022

How to get the position of scrollbar thumb

I am trying to build a custom-scrollbar

example

To get Thumb length :

A/B = C/D

D = C * (A/B)

All fine so far. but struggling to find the Thumb position

example

Given an (viewport) offset, how to get the thumb offset? or any suggestions?

Aucun commentaire:

Enregistrer un commentaire