@inweb/viewer-visualize 25.3.21 → 25.3.22

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.
@@ -4984,7 +4984,7 @@ class Viewer extends EventEmitter2 {
4984
4984
  };
4985
4985
  onProgress === null || onProgress === void 0 ? void 0 : onProgress(event);
4986
4986
  }));
4987
- this.visualizeJs = visualizeJs;
4987
+ this._visualizeJs = visualizeJs;
4988
4988
  this.visualizeJs.canvas = canvas;
4989
4989
  this.visualizeJs.Viewer.create();
4990
4990
  this.canvas = canvas;
@@ -5005,7 +5005,6 @@ class Viewer extends EventEmitter2 {
5005
5005
  return this;
5006
5006
  }
5007
5007
  dispose() {
5008
- var _a, _b, _c, _d;
5009
5008
  this.cancel();
5010
5009
  this.emitEvent({
5011
5010
  type: "dispose"
@@ -5013,19 +5012,20 @@ class Viewer extends EventEmitter2 {
5013
5012
  if (this.frameId) cancelAnimationFrame(this.frameId);
5014
5013
  this.frameId = 0;
5015
5014
  this.setActiveDragger("");
5016
- (_a = this._zoomWheelDragger) === null || _a === void 0 ? void 0 : _a.dispose();
5017
- (_b = this._gestureManager) === null || _b === void 0 ? void 0 : _b.dispose();
5018
5015
  this.removeAllListeners();
5019
- (_c = this._resizeObserver) === null || _c === void 0 ? void 0 : _c.disconnect();
5016
+ if (this._gestureManager) this._gestureManager.dispose();
5017
+ this._gestureManager = undefined;
5018
+ if (this._zoomWheelDragger) this._zoomWheelDragger.dispose();
5019
+ this._zoomWheelDragger = undefined;
5020
+ if (this._resizeObserver) this._resizeObserver.disconnect();
5020
5021
  this._resizeObserver = undefined;
5021
5022
  this.markup.dispose();
5022
- this.canvasEvents.forEach((x => {
5023
- var _a;
5024
- return (_a = this.canvas) === null || _a === void 0 ? void 0 : _a.removeEventListener(x, this.canvaseventlistener);
5025
- }));
5026
- this.canvas = undefined;
5027
- (_d = this.visualizeJs) === null || _d === void 0 ? void 0 : _d.getViewer().clear();
5028
- this.visualizeJs = undefined;
5023
+ if (this.canvas) {
5024
+ this.canvasEvents.forEach((x => this.canvas.removeEventListener(x, this.canvaseventlistener)));
5025
+ this.canvas = undefined;
5026
+ }
5027
+ if (this._visualizeJs) this._visualizeJs.getViewer().clear();
5028
+ this._visualizeJs = undefined;
5029
5029
  return this;
5030
5030
  }
5031
5031
  isInitialized() {
@@ -5109,6 +5109,9 @@ class Viewer extends EventEmitter2 {
5109
5109
  this._isRunAsyncUpdate = false;
5110
5110
  }
5111
5111
  }
5112
+ get visualizeJs() {
5113
+ return this._visualizeJs;
5114
+ }
5112
5115
  visLib() {
5113
5116
  return this.visualizeJs;
5114
5117
  }