@inweb/viewer-visualize 25.8.21 → 25.8.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inweb/viewer-visualize",
3
- "version": "25.8.21",
3
+ "version": "25.8.22",
4
4
  "description": "3D viewer powered by VisualizeJS",
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.21",
33
- "@inweb/eventemitter2": "~25.8.21",
34
- "@inweb/markup": "~25.8.21",
35
- "@inweb/viewer-core": "~25.8.21"
32
+ "@inweb/client": "~25.8.22",
33
+ "@inweb/eventemitter2": "~25.8.22",
34
+ "@inweb/markup": "~25.8.22",
35
+ "@inweb/viewer-core": "~25.8.22"
36
36
  },
37
37
  "visualizeJS": "https://opencloud.azureedge.net/libs/visualizejs/master/Visualize.js"
38
38
  }
@@ -331,6 +331,9 @@ export class Viewer
331
331
  if (!this.visualizeJs) return this;
332
332
 
333
333
  const { clientWidth, clientHeight } = this.canvas;
334
+
335
+ if (!clientWidth || !clientHeight) return this; // <- invisible viewer, or viewer with parent removed
336
+
334
337
  this.canvas.width = clientWidth * window.devicePixelRatio;
335
338
  this.canvas.height = clientHeight * window.devicePixelRatio;
336
339