-
Notifications
You must be signed in to change notification settings - Fork 167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Page indices go out of sync if dragged past threshold and back #38
Comments
kudos just for the linux screenshot. I'll look into it. It must be a very stupid bug |
One possible workaround for this is (probably): var previousPageIndex = gallery.pageIndex;
gallery.onFlip(function () {
if (Math.abs(gallery.pageIndex - previousPageIndex) > 1) {
gallery.goToPage(previousPageIndex);
return;
}
previousPageIndex = gallery.pageIndex;
)); |
This works only if loop is false of course. |
Looks like #39 has not been merged into master yet. It would be great if it was merged, thanks! |
the requested mod to #39 has not been applied... I'll work on this as soon as iScroll 5.1 is ready |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Can be reproduced in the project demo:
http://cubiq.org/dropbox/SwipeView/demo/gallery/
It take a few attempts, but if you drag the view past the threshold, then drag back just below the threshold (not all the way back), the page indices are updated but the shown view is still the same and is out of sync e.g. with the top indicators. I can already reproduce this every time and in our app this happens all the time by accident.
See screenshot, where the first image of the feed is shown, but the swipe indicator on the top highlights the last item:
Thanks!
The text was updated successfully, but these errors were encountered: