wieringen / tinyscrollbar

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

Resize/update events, $.on(), wrappers for any block and more #27

Closed dmythro closed 5 years ago

dmythro commented 10 years ago

Also added $.fn.tinyscrollbarUpdate() method, for window resize events. Thumb min size (very helpful for long lists). Improved selectors speed and heights calculation.

Please check it out and if makes sense - standalone version update is required as well.

wieringen commented 10 years ago

Thanks I will take a look :)

wieringen commented 10 years ago

I don't understand why you added a update method. There all ready is one. I guess that way is a little more convenient. What I dont like about its is that it exposes another method to the $.fn namespace.

dmythro commented 10 years ago

Well, that's one-line update (e.g. when resized) with setting scrollTo position. Also, when no Scrollbar inited - get a new one with default settings.

It's useful with current project. But maybe you have better idea how it may be done nicely?

ange007 commented 10 years ago

This commit will be accepted and updated? Very good thing.

dmythro commented 10 years ago

@wieringen I'll update for auto-merge if you want, because since it's waiting has conflicts now. But anyway I didn't update the standalone version.

Auto-wrap if needed is highly important for web apps to not duplicate markup for every control.

asleepwalker commented 9 years ago

Hmm, it seems like auto-wrap repeats again at every update(). After three updates my DOM looks like .viewport > .overflow > .viewport > .overflow > .viewport > .overflow > #content. It's really not good.

asleepwalker commented 9 years ago

Fixed it. asleepwalker/tinyscrollbar@b1ad9a1.

dmythro commented 9 years ago

Thanks!

dmythro commented 5 years ago

@wieringen wow, just realized it's still open! :)