Formula for calculating the height of the thumb
var arrowHeight = 25;
var viewportHeight = 200;
var contentHeight = 600;
var viewableRatio = viewportHeight / contentHeight;
var scrollBarArea = viewportHeight - arrowHeight * 2;
var thumbHeight = scrollBarArea * viewableRatio;
Formula for calculating the scroller content step
var scrollTrackSpace = self.contentHeight - self.viewportHeight;
var scrollThumbSpace = self.viewportHeight - self.thumbHeight;
var scrollJump = scrollTrackSpace / scrollThumbSpace;
Finally: -
Height Thumb = 50px;
Thumb Step Down = 1px;
Content Scroll Up = 2.6666666666666666px;
If you jump 1 pixel, then your content should scroll 2.66666666666666667 pixels.
, , : -