The 2nd post in the series explained the details behind creating kinetic scrolling with momentum. The demo for the post is a flick list with momentum but without the edge bouncing effect (Check it out).
I decided to see if I could add simple edge bouncing to what currently exists, and found out it was quite easy.
Here is the demo:
The changes are made to the scroll() and autoscroll() functions
Scroll function
Before:After:
Autoscroll function
Before:To accomplish this, as shown in the code snippets above, I take out the code that enforces edge restrictions from the scroll function, this allows the list move beyond the edge limits while its manually dragged.
This is just a very simple idea. I think this can be improved, one issue is the
Update:
Release function
Before:After:
No comments:
Post a Comment