@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inweb/viewer-visualize",
3
- "version": "25.8.4",
3
+ "version": "25.8.6",
4
4
  "description": "3D CAD and BIM data Viewer powered by Visualize",
5
5
  "homepage": "https://cloud.opendesign.com/docs/index.html",
6
6
  "license": "SEE LICENSE IN LICENSE",
@@ -29,10 +29,10 @@
29
29
  "docs": "typedoc"
30
30
  },
31
31
  "dependencies": {
32
- "@inweb/client": "~25.8.4",
33
- "@inweb/eventemitter2": "~25.8.4",
34
- "@inweb/markup": "~25.8.4",
35
- "@inweb/viewer-core": "~25.8.4"
32
+ "@inweb/client": "~25.8.6",
33
+ "@inweb/eventemitter2": "~25.8.6",
34
+ "@inweb/markup": "~25.8.6",
35
+ "@inweb/viewer-core": "~25.8.6"
36
36
  },
37
37
  "visualizeJS": "https://opencloud.azureedge.net/libs/visualizejs/master/Visualize.js"
38
38
  }
@@ -225,12 +225,10 @@ export class Viewer
225
225
  this.emitEvent({ type: "initializeprogress", data: loaded / total, loaded, total });
226
226
  });
227
227
 
228
- if (visualizeTimestamp !== this._visualizeTimestamp) {
229
- console.error(
228
+ if (visualizeTimestamp !== this._visualizeTimestamp)
229
+ throw new Error(
230
230
  "Viewer error: dispose() was called before initialize() completed. Are you using React strict mode?"
231
231
  );
232
- return this;
233
- }
234
232
 
235
233
  this._visualizeJs = visualizeJs;
236
234
  this.visualizeJs.canvas = canvas;
@@ -665,11 +663,13 @@ export class Viewer
665
663
  this._activeDragger.dispose();
666
664
  this._activeDragger = null;
667
665
  }
668
- const Constructor = this.draggerFactory.get(name);
669
- if (Constructor) {
670
- this._activeDragger = new Constructor(this);
671
- this._activeDragger.name = name;
672
- this._activeDragger.initialize();
666
+ if (this.visualizeJs) {
667
+ const Constructor = this.draggerFactory.get(name);
668
+ if (Constructor) {
669
+ this._activeDragger = new Constructor(this);
670
+ this._activeDragger.name = name;
671
+ this._activeDragger.initialize();
672
+ }
673
673
  }
674
674
  const canvas = this.canvas;
675
675
  if (canvas) {