@inweb/viewer-visualize 27.1.1 → 27.1.2
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
|
@@ -171,6 +171,11 @@
|
|
|
171
171
|
cancel() {
|
|
172
172
|
this.abortController.abort();
|
|
173
173
|
}
|
|
174
|
+
yield() {
|
|
175
|
+
return new Promise((resolve) => {
|
|
176
|
+
setTimeout(resolve, 0);
|
|
177
|
+
});
|
|
178
|
+
}
|
|
174
179
|
extractFileName(file) {
|
|
175
180
|
const regex = /[^/\\?#:]+(?=\?|#|$)/;
|
|
176
181
|
if (typeof file === "string")
|
|
@@ -18307,10 +18312,8 @@ js: import "konva/skia-backend";
|
|
|
18307
18312
|
if (model && typeof model.database === "string") {
|
|
18308
18313
|
file = model.file;
|
|
18309
18314
|
}
|
|
18310
|
-
if (!model)
|
|
18311
|
-
throw new Error(`Format not supported`);
|
|
18312
18315
|
let format = params.format;
|
|
18313
|
-
if (!format && typeof file["type"] === "string")
|
|
18316
|
+
if (!format && file && typeof file["type"] === "string")
|
|
18314
18317
|
format = file["type"].split(".").pop();
|
|
18315
18318
|
if (!format && typeof file === "string")
|
|
18316
18319
|
format = file.split(".").pop();
|
|
@@ -18318,7 +18321,7 @@ js: import "konva/skia-backend";
|
|
|
18318
18321
|
format = file.name.split(".").pop();
|
|
18319
18322
|
const loader = loaders.createLoader(this, model, format);
|
|
18320
18323
|
if (!loader)
|
|
18321
|
-
throw new Error(`Format not supported`);
|
|
18324
|
+
throw new Error(`Format not supported (${format})`);
|
|
18322
18325
|
this.loaders.push(loader);
|
|
18323
18326
|
this.emitEvent({ type: "geometrystart", file, model });
|
|
18324
18327
|
try {
|