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(annotations): Scroll to presentation page only when necessary #1223

Merged
merged 1 commit into from
Jun 16, 2020

Conversation

jstoffan
Copy link
Collaborator

@jstoffan jstoffan commented Jun 10, 2020

This change prevents the scroll position from being reset if the user has zoomed in and selects multiple annotations on the same page.

@jstoffan jstoffan requested a review from a team as a code owner June 10, 2020 23:35
this.setPage(getProp(data, 'target.location.value', 1));
const targetPage = getProp(data, 'target.location.value', 1);

if (this.pdfViewer.currentPageNumber !== targetPage) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to check if pdfViewer exists?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We don't really do that anywhere else, including setPage. Seems like overkill?

@jstoffan jstoffan merged commit 4b6ef6a into box:master Jun 16, 2020
@jstoffan jstoffan deleted the fix-presentation-scroll branch June 16, 2020 18:34
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.

3 participants