vue-safe-force-graph 2.0.49 → 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 t = yield this.$parent.getCanvasStage().toBlob();
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.49", 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 = [
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
  ".": {
@@ -43140,14 +43145,18 @@ const dke = {
43140
43145
  inputErrorMessage: "请输入20字以内快照名称"
43141
43146
  }).then((t) => Ge(this, [t], function* ({ value: e }) {
43142
43147
  this.bigLoading = !0, setTimeout(() => Ge(this, null, function* () {
43143
- const n = yield this.$refs.buttonList.svgToBlob(), r = new FormData();
43144
- r.append("data", this.history.toString()), r.append("name", e), r.append("thumb", n), this.graphApi.addSnapshot1(r).then((s) => {
43145
- this.snapshot = s.data, this.snapshot.name = e, this.$refs.snapshot.show();
43146
- }).catch((s) => {
43147
- this.onOutdate(s.res);
43148
- }).finally((s) => {
43149
- this.bigLoading = !1;
43150
- });
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
+ }
43151
43160
  }), 100);
43152
43161
  })).catch(() => {
43153
43162
  on({