ajoslin / angular-scrolly

Fake transform-scrolling with angular-friendly utilities
http://ajoslin.github.io/angular-scrolly
65 stars 7 forks source link

[question] Native scrolling #18

Open rtpm opened 11 years ago

rtpm commented 11 years ago

Andy, Have you considered enabling native webkit scrolling if such is detected on the device ? Something like overthrow.js library provides.

I'm just asking as I am aware that it's not what angular-scrolly was made for (pull to refresh for instance), so these features would not be available then.

ajoslin commented 11 years ago

Overflow native scrolling is actually not GPU-accelerated (as of iOS6 and Android 4.2), and is slower than our fake scrolling on large lists. I know, crazy lol. So there is no advantage to using it.

ajoslin commented 11 years ago

Someday soon I will get pull-to-refresh done ... but not focused on it right now.

rtpm commented 11 years ago

On my galaxy S (GT-9000) running android 2.3.6 using the builtuin browser scrolling is very laggy. I have to touch the screen.. wait a moment and then scroll. 1/10 scrolls actually works.

I mean... it lags on initiating the scroll / catching the scroll.

The phone is not busy while testing (no other cpu / memory consuming processes running).

Ps. the same applies to tiny.cc/ng-scrolly

ajoslin commented 11 years ago

I just tested it on my Galaxy. You are right, it is pretty slow on http://ajoslin.github.io/angular-scrolly/demo.

However, the lag is not in starting the scroll but in just the screen following the finger. It does not follow the finger smoothly; instead it jerks around.

I'm not sure how I would fix this though ...

rtpm commented 11 years ago

I'd say that once scrolling is "attached to you finger" it works fine :) The problem is that it doesn't want to initiate the scroll on finger up/down swipe.

Maybe this is related to ng-click() (ngTouch) attached to on most of the screen. I've noticed that if there's only a pure text on the screen (no hyperlinks with ng-click attached), the scroll works better, and more scrolls are initiated on swiping up/down.

Using angularjs 1.2.0rc2

ajoslin commented 11 years ago

Ok, I have an idea how to fix this, will look into it this week