diff --git a/src/lib/constants.js b/src/lib/constants.js index b9afc41cb1..a7aaef5ad7 100644 --- a/src/lib/constants.js +++ b/src/lib/constants.js @@ -129,6 +129,7 @@ export const ANNOTATOR_EVENT = { fetch: 'annotationsfetched', error: 'annotationerror', scale: 'scaleannotations', + visibilityToggle: 'annotationvisibilitytoggle', }; export const BROWSERS = { diff --git a/src/lib/viewers/BaseViewer.js b/src/lib/viewers/BaseViewer.js index d267c0f0c5..cdb8b5690b 100644 --- a/src/lib/viewers/BaseViewer.js +++ b/src/lib/viewers/BaseViewer.js @@ -545,6 +545,7 @@ class BaseViewer extends EventEmitter { */ handleFullscreenEnter() { this.resize(); + this.emit(ANNOTATOR_EVENT.visibilityToggle); } /** @@ -554,6 +555,7 @@ class BaseViewer extends EventEmitter { */ handleFullscreenExit() { this.resize(); + this.emit(ANNOTATOR_EVENT.visibilityToggle); } /**