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

Fix: fix page change flickering when zoomed in #384

Merged
merged 2 commits into from
Sep 12, 2017
Merged

Fix: fix page change flickering when zoomed in #384

merged 2 commits into from
Sep 12, 2017

Conversation

jeremypress
Copy link
Contributor

@pramodsum I reintroduced the concept of previous scroll position that you had before to fix the case where you are zoomed in enough that you would scroll back and for after a page change.

src/lib/util.js Outdated
// Scrolling down
if (currentScrollTop > previousScrollTop) {
pageNum = currentScrollTop > currentPageMiddleY ? currentPageNum + 1 : currentPageNum;
// Scrolling up
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move comment inside else{}

src/lib/util.js Outdated
return currentPageNum + 1;
} else if (currentScrollBottom < currentPageMiddleY) {
return currentPageNum - 1;
// Scrolling down
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move comment inside if() {}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@jeremypress jeremypress merged commit d091704 into box:master Sep 12, 2017
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

Successfully merging this pull request may close these issues.

2 participants