viral-viewer-2 6.6.1 → 6.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -7,7 +7,8 @@ export declare class ViralCentralizedEventHandler {
|
|
|
7
7
|
private contextMenuEventHandler;
|
|
8
8
|
cameraHandler(): void;
|
|
9
9
|
windowHandler(): void;
|
|
10
|
-
|
|
10
|
+
handleResize(entries: any): void;
|
|
11
|
+
private resizeObserver;
|
|
11
12
|
private _hoverElementEnable;
|
|
12
13
|
hoverElementHandler(): void;
|
|
13
14
|
enableHoverElement(value: boolean): void;
|
package/dist/index.mjs
CHANGED
|
@@ -26806,10 +26806,7 @@ const bl = {
|
|
|
26806
26806
|
};
|
|
26807
26807
|
class yP {
|
|
26808
26808
|
constructor(e) {
|
|
26809
|
-
this.viralViewerApi = e, this.elementProperties = {}, this.
|
|
26810
|
-
let i = t[0].contentRect;
|
|
26811
|
-
i.width, i.height, this.viralViewerApi.viralCamera.resizeCanvas();
|
|
26812
|
-
}), this._hoverElementEnable = !0, this._selectElementEnable = !0, this.isShiftPressed = !1, this.windowHandler(), this.contextMenuEventHandler(), this.hoverElementHandler(), this.selectElementHandler(), this.keyboardHandler(), this._visibilityManager = this.viralViewerApi.viralVisibilityManager;
|
|
26809
|
+
this.viralViewerApi = e, this.elementProperties = {}, this.resizeObserver = new ResizeObserver(this.handleResize), this._hoverElementEnable = !0, this._selectElementEnable = !0, this.isShiftPressed = !1, this.windowHandler(), this.contextMenuEventHandler(), this.hoverElementHandler(), this.selectElementHandler(), this.keyboardHandler(), this._visibilityManager = this.viralViewerApi.viralVisibilityManager;
|
|
26813
26810
|
}
|
|
26814
26811
|
contextMenuEventHandler() {
|
|
26815
26812
|
this.viralViewerApi.viralContextMenu && (this.viralViewerApi.viralContextMenu.addContextItem(
|
|
@@ -26893,10 +26890,14 @@ class yP {
|
|
|
26893
26890
|
//#endregion
|
|
26894
26891
|
//#region Window
|
|
26895
26892
|
windowHandler() {
|
|
26896
|
-
this.
|
|
26893
|
+
this.resizeObserver.observe(this.viralViewerApi.targetElement), window.onresize = () => {
|
|
26897
26894
|
this.viralViewerApi.viralCamera.resizeCanvas();
|
|
26898
26895
|
};
|
|
26899
26896
|
}
|
|
26897
|
+
// Callback function to handle resize events
|
|
26898
|
+
handleResize(e) {
|
|
26899
|
+
this.viralViewerApi.viralCamera && this.viralViewerApi.viralCamera.resizeCanvas();
|
|
26900
|
+
}
|
|
26900
26901
|
hoverElementHandler() {
|
|
26901
26902
|
const e = new jx(
|
|
26902
26903
|
15,
|