Vandzelyak / iscroll-js

Automatically exported from code.google.com/p/iscroll-js
MIT License
0 stars 0 forks source link

Better snap-scroll code, i changed it a little. #34

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Hi,

I changed the snap-scroll piece in the "touchEnd"-function a little bit. 
Now it scrolls back smoother when you drag the scroll out its boundaries.

So as example, if you scroll/drag to right, the scroller goes to the right. And 
left you see nothing. Because there's no previous page anymore. Then if you 
release your finger, it scroll's back much too fast. So i made a minimum 
duration of 350ms. Only if it's dragged out its boundaries.

I hope you can add it to the upcoming update. If it's a good piece of code, 
maybe there are some conflicts where i don't know about. But it's working for 
myself anyways.

You can search for: @Stijntjhe in the attached code to find the changes, there 
are 2 changes.

Original issue reported on code.google.com by stijnt...@gmail.com on 25 Oct 2010 at 6:39

Attachments:

GoogleCodeExporter commented 8 years ago
Thanks for your contribution. I'll surely consider it for inclusion.

Original comment by mat...@gmail.com on 25 Oct 2010 at 9:41