wieringen / tinyscrollbar

A lightweight cross browser javascript scrollbar.
http://baijs.com/tinyscrollbar
Other
398 stars 203 forks source link

update bottom behavior #31

Closed jfgodoy closed 9 years ago

jfgodoy commented 10 years ago

I think scrollbar.update('bottom') it should be align at the bottom only if does not fit in the viewport. ie instead of

case "bottom":
    this.contentPosition = this.contentSize - this.viewportSize;
    break;

use

case "bottom":
    this.contentPosition = Math.max(this.contentSize - this.viewportSize, 0);
    break;

what do you think?

wieringen commented 9 years ago

Yes you are right. Thanks for the fix.

wieringen commented 9 years ago

Released this in 2.1.9