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: Issue when 'load' event is fired before BoxAnnotations is loaded #108

Merged
merged 3 commits into from
May 11, 2017
Merged

Fix: Issue when 'load' event is fired before BoxAnnotations is loaded #108

merged 3 commits into from
May 11, 2017

Conversation

pramodsum
Copy link
Contributor

No description provided.

pramodsum added 2 commits May 9, 2017 19:20
- Ensures that promise to load BoxAnnotations.js completes before loading annotations, even if the viewer 'load' event has already been fired
- Re-renders annotations on documents after resize
Copy link
Contributor

@jeremypress jeremypress left a comment

Choose a reason for hiding this comment

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

lgtm

if (this.annotator) {
this.annotator.setScale(this.pdfViewer.currentScale); // Set scale to current numerical scale
this.annotator.setScale(this.pdfViewer.currentScale);
this.annotator.renderAnnotations();
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this related to loading?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Forgot to add a comment in the PR for this but nope it is not! When the document is rescaled it wasn't re-rendering the annotations so this fixes that

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll add it as a comment in the commit when I merge

@pramodsum pramodsum merged commit b4c8d32 into box:master May 11, 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.

3 participants