From a320a2fe77ccfc0b30a5edbd5ffb0e456399166b Mon Sep 17 00:00:00 2001 From: Oscar Lorentzon Date: Thu, 7 Nov 2019 09:14:02 +0100 Subject: [PATCH] feat: add api to get canvas container --- src/viewer/Viewer.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/viewer/Viewer.ts b/src/viewer/Viewer.ts index 44efa6f7..f040a385 100644 --- a/src/viewer/Viewer.ts +++ b/src/viewer/Viewer.ts @@ -449,6 +449,18 @@ export class Viewer extends EventEmitter { }); } + /** + * Returns the HTML element containing the viewer's element. + * + * @description This is the element to which event bindings for viewer + * interactivity (such as panning and zooming) are attached. + * + * @returns {HTMLElement} The container viewer's element. + */ + public getCanvasContainer(): HTMLElement { + return this._container.canvasContainer; + } + /** * Get the basic coordinates of the current image that is * at the center of the viewport.