vue-safe-force-graph 2.0.48 → 2.0.50
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.
|
@@ -16372,7 +16372,7 @@ function dl(e) {
|
|
|
16372
16372
|
return Ge(this, null, function* () {
|
|
16373
16373
|
return new Promise((t, n) => {
|
|
16374
16374
|
const r = new Image();
|
|
16375
|
-
r.onload = () => {
|
|
16375
|
+
r.crossOrigin = "anonymous", r.onload = () => {
|
|
16376
16376
|
t(r);
|
|
16377
16377
|
}, r.onerror = (s) => {
|
|
16378
16378
|
n(s);
|
|
@@ -27374,7 +27374,12 @@ const dle = {
|
|
|
27374
27374
|
svgToBlob() {
|
|
27375
27375
|
return Ge(this, null, function* () {
|
|
27376
27376
|
this.$parent.centerAndZoom(), this.$parent.addCanvasBg();
|
|
27377
|
-
const
|
|
27377
|
+
const e = this.$parent.getCanvasStage();
|
|
27378
|
+
e.find("Image").forEach((n) => {
|
|
27379
|
+
const r = n.image();
|
|
27380
|
+
r && (r.crossOrigin = "Anonymous");
|
|
27381
|
+
});
|
|
27382
|
+
const t = yield e.toBlob();
|
|
27378
27383
|
return this.$parent.removeCanvasBg(), this.$parent.reset(), t;
|
|
27379
27384
|
});
|
|
27380
27385
|
},
|
|
@@ -40302,7 +40307,7 @@ const EAe = /* @__PURE__ */ ln(BTe, [["render", xAe], ["__scopeId", "data-v-a8e2
|
|
|
40302
40307
|
utime: "2019-05-06 15:08:10",
|
|
40303
40308
|
children: []
|
|
40304
40309
|
}
|
|
40305
|
-
], AAe = "vue-safe-force-graph", kAe = "2.0.
|
|
40310
|
+
], AAe = "vue-safe-force-graph", kAe = "2.0.50", OAe = "force_graph in security area", NAe = "jason zhang", IAe = "./lib/vue-safe-force-graph.js", PAe = "./lib/vue-safe-force-graph.umd.cjs", RAe = "module", LAe = [
|
|
40306
40311
|
"/lib/"
|
|
40307
40312
|
], DAe = {
|
|
40308
40313
|
".": {
|
|
@@ -40750,8 +40755,8 @@ const { toClipboard: zAe } = Og(), VAe = "Arial,Helvetica Neue,Helvetica,PingFan
|
|
|
40750
40755
|
},
|
|
40751
40756
|
update(e = !1) {
|
|
40752
40757
|
return Ge(this, null, function* () {
|
|
40753
|
-
var t;
|
|
40754
|
-
this.iconAllLoaded
|
|
40758
|
+
var t, n, r;
|
|
40759
|
+
!this.iconAllLoaded && ((n = (t = this.moduleDetail) == null ? void 0 : t.nodes) != null && n.length) && (yield this.loadIcons()), !this.destroyed && (r = this.nodes) != null && r.length && (this.initScript(), kr("update"), e && this.updateSimulation(), this.doClearCanvas(), this.paintLinks(), this.paintNodes(), this.updateSelection(), this.ticked(), this.actNum === 9 && setTimeout(() => {
|
|
40755
40760
|
this.centerAndZoom(0.8);
|
|
40756
40761
|
}, 200));
|
|
40757
40762
|
});
|
|
@@ -40767,7 +40772,9 @@ const { toClipboard: zAe } = Og(), VAe = "Arial,Helvetica Neue,Helvetica,PingFan
|
|
|
40767
40772
|
const e = this.stage.width() / 2, t = this.stage.height() / 2, n = this.selection.map((r) => r.id);
|
|
40768
40773
|
this.nodes.forEach((r) => Ge(this, null, function* () {
|
|
40769
40774
|
var b, _, w, E, S, C, k, O, N, P, q, R, W, z, J, re, ae, H, G, K;
|
|
40770
|
-
|
|
40775
|
+
let s;
|
|
40776
|
+
r.type === "nodeType" ? s = this.iconSizeComputed[r.icon] || this.iconSizeComputed.node_type : s = this.iconSize[r.icon] || this.iconSize[r.type] || 24;
|
|
40777
|
+
const o = ((w = (_ = (b = r == null ? void 0 : r.detail) == null ? void 0 : b.info) == null ? void 0 : _.basic) == null ? void 0 : w.level) || "", l = (C = (S = (E = r == null ? void 0 : r.detail) == null ? void 0 : E.info) == null ? void 0 : S.basic) == null ? void 0 : C.flag;
|
|
40771
40778
|
let a;
|
|
40772
40779
|
try {
|
|
40773
40780
|
a = yield this.getNodeImage(r);
|
|
@@ -43138,14 +43145,18 @@ const dke = {
|
|
|
43138
43145
|
inputErrorMessage: "请输入20字以内快照名称"
|
|
43139
43146
|
}).then((t) => Ge(this, [t], function* ({ value: e }) {
|
|
43140
43147
|
this.bigLoading = !0, setTimeout(() => Ge(this, null, function* () {
|
|
43141
|
-
|
|
43142
|
-
|
|
43143
|
-
|
|
43144
|
-
|
|
43145
|
-
|
|
43146
|
-
|
|
43147
|
-
|
|
43148
|
-
|
|
43148
|
+
try {
|
|
43149
|
+
const n = yield this.$refs.buttonList.svgToBlob(), r = new FormData();
|
|
43150
|
+
r.append("data", this.history.toString()), r.append("name", e), r.append("thumb", n), this.graphApi.addSnapshot1(r).then((s) => {
|
|
43151
|
+
this.snapshot = s.data, this.snapshot.name = e, this.$refs.snapshot.show();
|
|
43152
|
+
}).catch((s) => {
|
|
43153
|
+
this.onOutdate(s.res);
|
|
43154
|
+
}).finally((s) => {
|
|
43155
|
+
this.bigLoading = !1;
|
|
43156
|
+
});
|
|
43157
|
+
} catch (n) {
|
|
43158
|
+
this.bigLoading = !1, console.log(n);
|
|
43159
|
+
}
|
|
43149
43160
|
}), 100);
|
|
43150
43161
|
})).catch(() => {
|
|
43151
43162
|
on({
|