cubiq / 2-way-iScroll

Horizontal snap scroll (carousel) + vertical free scroll on mobile webkit using iScroll
MIT License
116 stars 27 forks source link

Page swipe #8

Open reissy88 opened 12 years ago

reissy88 commented 12 years ago

Noticed if dragging a page left or right very slowly the page can be stopped in the middle of both pages, also on orientation change I have dynamically updated the width of the containers however the page seems to get stuck in the middle of the 2 pages.

However touching the page then fixes the problem.

dbogatz commented 11 years ago

patch line 313 to: if (that.dirX || this.x % that.pageWidth)

I noticed the same problem - it's because of the _move function where it states: that.dirX = deltaX > 0 ? -1 : deltaX < 0 ? 1 : 0; <-- so dirX may become 0 if touch leaved while stop moves.

reissy88 commented 11 years ago

Thanks mate... Hahaaha works great!!

Not sure why Matteo added the option to stop between pages, 2 way iScroll is very cool I hope Matteo hasn't forgot about it.