vis-core 0.30.0-beta.30 → 0.30.0-beta.31
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/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/index.module.js +21 -21
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.module.js
CHANGED
|
@@ -63,7 +63,7 @@ import { continentsCountriesIso2 } from "geojson-cn";
|
|
|
63
63
|
Array.prototype.at || (Array.prototype.at = function(v) {
|
|
64
64
|
return v < 0 && (v = this.length + v), this[v];
|
|
65
65
|
});
|
|
66
|
-
const version = "0.30.0-beta.
|
|
66
|
+
const version = "0.30.0-beta.31", publicKeyPEM = "LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUlJQklqQU5CZ2txaGtpRzl3MEJBUUVGQUFPQ0FROEFNSUlCQ2dLQ0FRRUEyTG1aVVQzVG9LZEVRRUdrdUU1QQo3dnlYTzRMM1Z6NDA5RFF2a2xzRHZ2SytNM2M2OGl4ZEVhZDZFcnZGS2FKQ1QrNTZNdU1XSXhUTnlDZDVQSkFGCjVYdzI4cW1iVkVCR3FGdXVIZTltSm5GUmRXN1NpK1Z1cTZvRWxwQkRkeEFIQ0dsWVVpU1R3WmhBbjJaVXJLSUYKd1J2c1k1bi9uWWNhZnl5QW9tRjhmNVRsTkpwS1JtbDU3WlRSWjBMdzdQRDFSeHFIbmJ0YWFETkpiSDV5eFd6cQpaVTBwQWhxMFNkNHdlOW1DUTJWWXc5czhtUERLbW4rU083eGovSUsrR1ZEaEJNOUpaZ3VIcGFZUGt3bWd5UkdwCkx6V0tHMkZULzJRalZUT1dRT09mRFVtVitDSVlsN1hVVlh1Q0toYWFNQ0ZVa1JQOHg4aEZucmNFeklHQ1JpM3IKK3dJREFRQUIKLS0tLS1FTkQgUFVCTElDIEtFWS0tLS0t", accessToken = {
|
|
67
67
|
token: void 0,
|
|
68
68
|
getInfo() {
|
|
69
69
|
if (!this.token)
|
|
@@ -140399,39 +140399,39 @@ class Editor {
|
|
|
140399
140399
|
}
|
|
140400
140400
|
fromJSON(e, r) {
|
|
140401
140401
|
return B0(this, null, function* () {
|
|
140402
|
-
var V, le
|
|
140402
|
+
var V, le;
|
|
140403
140403
|
let o = null;
|
|
140404
140404
|
try {
|
|
140405
140405
|
r && !y(r) ? console.warn(
|
|
140406
140406
|
"fromJSON 第二个参数已修改,{beforeSetVisOptions:(r)=>r} 替代"
|
|
140407
140407
|
) : r && (o = r.fj, delete r.fj, this.hooks.addEvents(r));
|
|
140408
|
-
let
|
|
140408
|
+
let fe;
|
|
140409
140409
|
if (typeof e == "string") {
|
|
140410
|
-
const
|
|
140410
|
+
const Le = this.options.assetsPrefix + e;
|
|
140411
140411
|
console.time("vis-core:time.json-fetch");
|
|
140412
|
-
const { res:
|
|
140413
|
-
if (console.timeEnd("vis-core:time.json-fetch"),
|
|
140414
|
-
throw new Error("fromJSON error:" +
|
|
140415
|
-
|
|
140412
|
+
const { res: Ce, err: Re } = yield jsonFetch(Le);
|
|
140413
|
+
if (console.timeEnd("vis-core:time.json-fetch"), Re)
|
|
140414
|
+
throw new Error("fromJSON error:" + Re);
|
|
140415
|
+
fe = Ce;
|
|
140416
140416
|
} else
|
|
140417
|
-
|
|
140418
|
-
if (this.hooks.dispatch("beforeFromJSON"), o && (
|
|
140417
|
+
fe = e;
|
|
140418
|
+
if (this.hooks.dispatch("beforeFromJSON"), o && (fe = yield o(fe)), fe = fixJSON(fe), fe.at && (accessToken.token = fe.at), !this.storage) {
|
|
140419
140419
|
if (!accessToken.token)
|
|
140420
140420
|
throw new Error("设置 token 或平台重新下载 JSON 文件");
|
|
140421
|
-
const
|
|
140422
|
-
if (!
|
|
140421
|
+
const Le = accessToken.getInfo();
|
|
140422
|
+
if (!Le || !Le.isValid)
|
|
140423
140423
|
throw new Error("need accessToken");
|
|
140424
140424
|
}
|
|
140425
|
-
if (this.config.fromJSON(
|
|
140426
|
-
const
|
|
140427
|
-
|
|
140425
|
+
if (this.config.fromJSON(fe.c), this.history.fromJSON(fe.h), this.viewport.fromJSON(fe.v), this.hooks.fromJSON(fe.s), this.config.compareVersion(), yield this.history.processUndos(this.options.processUndosMaxFrameTime), (V = fe.v.bg) != null && V.texture && this.viewport.vis) {
|
|
140426
|
+
const Le = parseTexture(fe.v.bg.texture);
|
|
140427
|
+
Le.colorSpace = SRGBColorSpace, this.viewport.vis.pencil.scene.background = Le;
|
|
140428
140428
|
}
|
|
140429
|
-
return this.hooks.dispatch("beforeShow"), (
|
|
140430
|
-
var
|
|
140431
|
-
(
|
|
140432
|
-
}), this.hooks.dispatch("afterFromJSON"),
|
|
140433
|
-
} catch (
|
|
140434
|
-
throw this.hooks.dispatch("errorFromJSON"), new Error("fromJSON error:" +
|
|
140429
|
+
return this.hooks.dispatch("beforeShow"), this.viewport.vis && (this.playing && this.viewport.vis.lead.prefabGroup.hide(), this.viewport.vis.show()), this.hooks.dispatch("afterShow"), (le = this.pencil.controls) == null || le.saveState(), this.select(null), window.requestIdleCallback(() => {
|
|
140430
|
+
var Le;
|
|
140431
|
+
(Le = this.viewport.vis) == null || Le.worker.dispose();
|
|
140432
|
+
}), this.hooks.dispatch("afterFromJSON"), fe;
|
|
140433
|
+
} catch (fe) {
|
|
140434
|
+
throw this.hooks.dispatch("errorFromJSON"), new Error("fromJSON error:" + fe);
|
|
140435
140435
|
}
|
|
140436
140436
|
});
|
|
140437
140437
|
}
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "0.30.0-beta.
|
|
1
|
+
declare const _default: "0.30.0-beta.31";
|
|
2
2
|
export default _default;
|