Skip to content

Commit

Permalink
Fix: Ensuring annotation scale is set on files without any annotations (
Browse files Browse the repository at this point in the history
  • Loading branch information
pramodsum authored Jul 20, 2017
1 parent 9487634 commit aa93d09
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
2 changes: 1 addition & 1 deletion src/lib/annotations/Annotator.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ class Annotator extends EventEmitter {
* @return {void}
*/
renderAnnotationsOnPage(pageNum) {
if (this.threads[pageNum]) {
if (this.threads && this.threads[pageNum]) {
this.threads[pageNum].forEach((thread) => {
thread.show();
});
Expand Down
5 changes: 0 additions & 5 deletions src/lib/viewers/BaseViewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -617,11 +617,6 @@ class BaseViewer extends EventEmitter {
* @return {void}
*/
scaleAnnotations(data) {
// Don't try to render annotations if none have been fetched yet
if (Object.keys(this.annotator.threads).length === 0) {
return;
}

this.annotator.setScale(data.scale);
this.annotator.rotateAnnotations(data.rotationAngle, data.pageNum);
}
Expand Down

0 comments on commit aa93d09

Please sign in to comment.