Skip to content

Commit

Permalink
chore: remove annotationControls check
Browse files Browse the repository at this point in the history
  • Loading branch information
Conrad Chan committed Oct 26, 2020
1 parent 104a1c2 commit b240472
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/lib/viewers/doc/DocBaseViewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -1575,7 +1575,7 @@ class DocBaseViewer extends BaseViewer {
initAnnotations() {
super.initAnnotations();

if (this.areNewAnnotationsEnabled() && this.annotationControls) {
if (this.areNewAnnotationsEnabled()) {
this.annotator.addListener('annotations_create', this.handleAnnotationCreateEvent);
this.annotator.addListener('creator_staged_change', this.handleAnnotationCreatorChangeEvent);
this.annotator.addListener('creator_status_change', this.handleAnnotationCreatorChangeEvent);
Expand Down
4 changes: 1 addition & 3 deletions src/lib/viewers/image/ImageViewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -514,15 +514,13 @@ class ImageViewer extends ImageBaseViewer {
return;
}

// Only on success do we exit create annotation mode. If error occurs,
// we remain in create mode
this.annotator.emit('annotations_active_set', id);
}

initAnnotations() {
super.initAnnotations();

if (this.areNewAnnotationsEnabled() && this.annotationControls) {
if (this.areNewAnnotationsEnabled()) {
this.annotator.addListener('annotations_create', this.handleAnnotationCreateEvent);
}
}
Expand Down

0 comments on commit b240472

Please sign in to comment.