stackfull / angular-virtual-scroll

Source for the sf.virtualScroll module for AngularJS
MIT License
262 stars 42 forks source link

smooth scrolling via in scroll handler #10

Closed onsails closed 11 years ago

onsails commented 11 years ago

If node with directive sf-virtual-repeat contains heavy logic and / or collection is too big scroll is very slow. I use angular promises to handle scroll events only when user stopped scrolling.

stackfull commented 11 years ago

I had a good play around with throttling the scroll handler some time ago because it was a killer in FF. Turned out the problem was actually something in jqLite and throttling didn't really help. See #7 for details.

It's an awkward trade-off, working in on-scroll, and this solution (to wait for stop scroll) becomes a bug in other peoples' eyes. See #8. So if I was going to put throttling in, it would have to be configurable and default to off.

onsails commented 11 years ago

ok, may be when we will be working on touch interfaces in our app we will make this function optional, configurable and dependent on client's device.