jamesflorentino / nanoScrollerJS

A jQuery plugin that offers a simplistic way of implementing Lion OS scrollbars.
http://jamesflorentino.github.com/nanoScrollerJS/
MIT License
2.69k stars 502 forks source link

Do not reset newly created scroller; reset height on destroy #278

Open netzkind opened 9 years ago

netzkind commented 9 years ago
kristerkari commented 9 years ago

Is there a problem with the performance when creating the scroller? Just trying to figure out if this change is necessary.

kristerkari commented 9 years ago

@netzkind ping

netzkind commented 9 years ago

Sorry, i didn't think you are serious about this. The reset-method in nanoscroller does loads of things, none of which is necessary to do twice to a newly created element. If there is no need to do something, then why do it?

So yes, it's a performance-problem, especially when used on low-end-devices.

kristerkari commented 9 years ago

@netzkind Thanks for the explanation.

I'll need to test this out on different browsers before I can pull it in. Of course if you have time or interest to help with that, then merging these changes will be easier.