Skip to content

Commit

Permalink
feat(annotations): Hide annotations when fullscreen is active
Browse files Browse the repository at this point in the history
  • Loading branch information
Mingze Xiao committed Apr 8, 2020
1 parent a0c0827 commit f1a0402
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/lib/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ export const ANNOTATOR_EVENT = {
fetch: 'annotationsfetched',
error: 'annotationerror',
scale: 'scaleannotations',
visibilityToggle: 'annotationvisibilitytoggle',
};

export const BROWSERS = {
Expand Down
2 changes: 2 additions & 0 deletions src/lib/viewers/BaseViewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,7 @@ class BaseViewer extends EventEmitter {
*/
handleFullscreenEnter() {
this.resize();
this.emit(ANNOTATOR_EVENT.visibilityToggle);
}

/**
Expand All @@ -554,6 +555,7 @@ class BaseViewer extends EventEmitter {
*/
handleFullscreenExit() {
this.resize();
this.emit(ANNOTATOR_EVENT.visibilityToggle);
}

/**
Expand Down

0 comments on commit f1a0402

Please sign in to comment.