@inweb/viewer-visualize 27.1.1 → 27.1.3
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": "27.1.
|
|
3
|
+
"version": "27.1.3",
|
|
4
4
|
"description": "JavaScript library for rendering CAD and BIM files in a browser using 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": "~27.1.
|
|
33
|
-
"@inweb/eventemitter2": "~27.1.
|
|
34
|
-
"@inweb/markup": "~27.1.
|
|
35
|
-
"@inweb/viewer-core": "~27.1.
|
|
32
|
+
"@inweb/client": "~27.1.3",
|
|
33
|
+
"@inweb/eventemitter2": "~27.1.3",
|
|
34
|
+
"@inweb/markup": "~27.1.3",
|
|
35
|
+
"@inweb/viewer-core": "~27.1.3"
|
|
36
36
|
},
|
|
37
37
|
"visualizeJS": "https://public-fhemb7e3embacwec.z02.azurefd.net/libs/visualizejs/master/Visualize.js"
|
|
38
38
|
}
|
package/src/Viewer/Viewer.ts
CHANGED
|
@@ -548,15 +548,14 @@ export class Viewer
|
|
|
548
548
|
if (model && typeof model.database === "string") {
|
|
549
549
|
file = model.file;
|
|
550
550
|
}
|
|
551
|
-
if (!model) throw new Error(`Format not supported`);
|
|
552
551
|
|
|
553
552
|
let format = params.format;
|
|
554
|
-
if (!format && typeof file["type"] === "string") format = file["type"].split(".").pop();
|
|
553
|
+
if (!format && file && typeof file["type"] === "string") format = file["type"].split(".").pop();
|
|
555
554
|
if (!format && typeof file === "string") format = file.split(".").pop();
|
|
556
555
|
if (!format && file instanceof globalThis.File) format = file.name.split(".").pop();
|
|
557
556
|
|
|
558
557
|
const loader = loaders.createLoader(this, model, format);
|
|
559
|
-
if (!loader) throw new Error(`Format not supported`);
|
|
558
|
+
if (!loader) throw new Error(`Format not supported (${format})`);
|
|
560
559
|
this.loaders.push(loader);
|
|
561
560
|
|
|
562
561
|
this.emitEvent({ type: "geometrystart", file, model });
|