Skip to content
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

Bug when having more than 9 horizontal pages #24

Open
davidhellsing opened this issue Aug 18, 2011 · 1 comment
Open

Bug when having more than 9 horizontal pages #24

davidhellsing opened this issue Aug 18, 2011 · 1 comment

Comments

@davidhellsing
Copy link

There is a bug if you add more than 9 pages, when you move to the 10th page it jumps to the 11th page, causing the whole thing to break eventually.

You can easily replicate this if you simply add more colors to the demo here: http://joehewitt.github.com/scrollability/example2.html

Try increasing the array of colors to 12.

I’m trying to debug the source, I’ll post here if I can find anything.

@davidhellsing
Copy link
Author

OK, it’s the margin thing that does this, setting a margin to the .page as in the example makes the position/viewport calculate the wrong pageIndex eventually.

In the demo, it happens after 9 pages, since that is the breaking point when position is -340 and viewport is 320 (-10 becomes -12).

I’m not sure how to fix this, I guess you can detect extra animation margins and add it to the viewport for a closer calculation, but I’m not sure what effect this could have.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant