@inweb/viewer-visualize 25.8.4 → 25.8.6
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.
package/dist/viewer-visualize.js
CHANGED
|
@@ -13102,10 +13102,7 @@
|
|
|
13102
13102
|
};
|
|
13103
13103
|
}
|
|
13104
13104
|
initialize(container, pointerEvents, viewer, worldTransformer) {
|
|
13105
|
-
if (!Konva)
|
|
13106
|
-
console.error('Markup error: Konva is not initialized. Update node_modules or add to your page <script src="https://unpkg.com/konva@9/konva.min.js"><\/script>');
|
|
13107
|
-
return;
|
|
13108
|
-
}
|
|
13105
|
+
if (!Konva) throw new Error('Markup error: Konva is not initialized. Forgot to add <script src="https://unpkg.com/konva@9/konva.min.js"><\/script> to your page?');
|
|
13109
13106
|
this._viewer = viewer;
|
|
13110
13107
|
this._worldTransformer = worldTransformer !== null && worldTransformer !== void 0 ? worldTransformer : new WorldTransform;
|
|
13111
13108
|
this._container = container;
|
|
@@ -16668,10 +16665,8 @@
|
|
|
16668
16665
|
onProgress(new ProgressEvent("progress", { lengthComputable: true, loaded, total }));
|
|
16669
16666
|
this.emitEvent({ type: "initializeprogress", data: loaded / total, loaded, total });
|
|
16670
16667
|
});
|
|
16671
|
-
if (visualizeTimestamp !== this._visualizeTimestamp)
|
|
16672
|
-
|
|
16673
|
-
return this;
|
|
16674
|
-
}
|
|
16668
|
+
if (visualizeTimestamp !== this._visualizeTimestamp)
|
|
16669
|
+
throw new Error("Viewer error: dispose() was called before initialize() completed. Are you using React strict mode?");
|
|
16675
16670
|
this._visualizeJs = visualizeJs;
|
|
16676
16671
|
this.visualizeJs.canvas = canvas;
|
|
16677
16672
|
this.visualizeJs.Viewer.create();
|
|
@@ -17032,11 +17027,13 @@
|
|
|
17032
17027
|
this._activeDragger.dispose();
|
|
17033
17028
|
this._activeDragger = null;
|
|
17034
17029
|
}
|
|
17035
|
-
|
|
17036
|
-
|
|
17037
|
-
|
|
17038
|
-
|
|
17039
|
-
|
|
17030
|
+
if (this.visualizeJs) {
|
|
17031
|
+
const Constructor = this.draggerFactory.get(name);
|
|
17032
|
+
if (Constructor) {
|
|
17033
|
+
this._activeDragger = new Constructor(this);
|
|
17034
|
+
this._activeDragger.name = name;
|
|
17035
|
+
this._activeDragger.initialize();
|
|
17036
|
+
}
|
|
17040
17037
|
}
|
|
17041
17038
|
const canvas = this.canvas;
|
|
17042
17039
|
if (canvas) {
|