@wyltils/ems-editor 1.0.0 → 1.0.1
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.es.js +21 -14
- package/dist/index.umd.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -24452,18 +24452,18 @@ const Xt = (s, t) => {
|
|
|
24452
24452
|
__name: "vueNode",
|
|
24453
24453
|
setup(s) {
|
|
24454
24454
|
Wd((h) => ({
|
|
24455
|
-
|
|
24456
|
-
|
|
24457
|
-
|
|
24458
|
-
|
|
24459
|
-
|
|
24460
|
-
|
|
24461
|
-
|
|
24455
|
+
v3bd093c9: e.value.opacity,
|
|
24456
|
+
v4bfbfcba: e.value.borderStyle,
|
|
24457
|
+
v94079056: e.value.borderWidth + "px",
|
|
24458
|
+
v4dc3d956: e.value.borderColor,
|
|
24459
|
+
b3c2b4a6: e.value.borderRadius + "px",
|
|
24460
|
+
v760ff493: e.value.backgroundColor,
|
|
24461
|
+
v76636e8b: e.value.backgroundImage
|
|
24462
24462
|
}));
|
|
24463
24463
|
const t = Ke("getNode"), e = ot({}), n = ot(128), i = ot(128), o = ir(() => Math.min(n.value, i.value)), r = ({ current: h }) => {
|
|
24464
24464
|
n.value = h.width, i.value = h.height;
|
|
24465
24465
|
}, a = ({ current: h }) => {
|
|
24466
|
-
|
|
24466
|
+
e.value = { ...e.value, ...h };
|
|
24467
24467
|
};
|
|
24468
24468
|
let l = null, c = null;
|
|
24469
24469
|
return oe(() => {
|
|
@@ -24472,7 +24472,7 @@ const Xt = (s, t) => {
|
|
|
24472
24472
|
l.setData({
|
|
24473
24473
|
progress: (h + 10) % 100
|
|
24474
24474
|
});
|
|
24475
|
-
},
|
|
24475
|
+
}, 2e3);
|
|
24476
24476
|
}), xe(() => {
|
|
24477
24477
|
l.off("change:data", a), l.off("change:size", r), c && clearInterval(c);
|
|
24478
24478
|
}), (h, u) => {
|
|
@@ -24489,7 +24489,7 @@ const Xt = (s, t) => {
|
|
|
24489
24489
|
], 4);
|
|
24490
24490
|
};
|
|
24491
24491
|
}
|
|
24492
|
-
}, hM = /* @__PURE__ */ Xt(cM, [["__scopeId", "data-v-
|
|
24492
|
+
}, hM = /* @__PURE__ */ Xt(cM, [["__scopeId", "data-v-7afcc9e2"]]), uM = ["innerHTML"], dM = {
|
|
24493
24493
|
__name: "svgNode",
|
|
24494
24494
|
setup(s) {
|
|
24495
24495
|
const t = Ke("getNode"), e = ot(50), n = ot(50), i = ot(""), o = ot("#ffffff"), r = ir(() => Math.min(e.value, n.value)), a = ({ current: c }) => {
|
|
@@ -24743,7 +24743,12 @@ const Xt = (s, t) => {
|
|
|
24743
24743
|
}), this.graph.on("edge:click", ({ e, x: n, y: i, edge: o }) => {
|
|
24744
24744
|
console.log("edge:click", n, i, o.id), s.setTarget("edge", o.id);
|
|
24745
24745
|
}), this.graph.on("node:click", ({ e, x: n, y: i, node: o }) => {
|
|
24746
|
-
|
|
24746
|
+
var r;
|
|
24747
|
+
if (console.log("node:click", n, i, o.id), (r = o.id) != null && r.includes("line")) {
|
|
24748
|
+
this.graph.clearTransformWidgets(), e.stopPropagation();
|
|
24749
|
+
return;
|
|
24750
|
+
}
|
|
24751
|
+
s.setTarget("node", o.id);
|
|
24747
24752
|
}), this.graph.on("edge:mouseenter", ({ cell: e }) => {
|
|
24748
24753
|
e.addTools([
|
|
24749
24754
|
{
|
|
@@ -25428,6 +25433,7 @@ const s2 = Object.entries(n2).map(([s, t]) => ({
|
|
|
25428
25433
|
const d = h.position();
|
|
25429
25434
|
console.log(h, h.position()), h.remove();
|
|
25430
25435
|
const g = t.graph.addNode({
|
|
25436
|
+
id: "line" + crypto.randomUUID(),
|
|
25431
25437
|
x: d.x - 50,
|
|
25432
25438
|
y: d.y,
|
|
25433
25439
|
width: 5,
|
|
@@ -25440,6 +25446,7 @@ const s2 = Object.entries(n2).map(([s, t]) => ({
|
|
|
25440
25446
|
},
|
|
25441
25447
|
zIndex: 1
|
|
25442
25448
|
}), f = t.graph.addNode({
|
|
25449
|
+
id: "line" + crypto.randomUUID(),
|
|
25443
25450
|
x: d.x + 50,
|
|
25444
25451
|
y: d.y,
|
|
25445
25452
|
width: 5,
|
|
@@ -25564,7 +25571,7 @@ const s2 = Object.entries(n2).map(([s, t]) => ({
|
|
|
25564
25571
|
]);
|
|
25565
25572
|
};
|
|
25566
25573
|
}
|
|
25567
|
-
}, f2 = /* @__PURE__ */ Xt(g2, [["__scopeId", "data-v-
|
|
25574
|
+
}, f2 = /* @__PURE__ */ Xt(g2, [["__scopeId", "data-v-c04c6e41"]]), p2 = { class: "graphics" }, m2 = { class: "menus" }, b2 = {
|
|
25568
25575
|
__name: "index",
|
|
25569
25576
|
setup(s) {
|
|
25570
25577
|
const t = ot(0);
|
|
@@ -25700,14 +25707,14 @@ const s2 = Object.entries(n2).map(([s, t]) => ({
|
|
|
25700
25707
|
__name: "nodePanel",
|
|
25701
25708
|
setup(s) {
|
|
25702
25709
|
var r;
|
|
25703
|
-
const t = te(), e = Ke("cellId"), n = Ke("getCurCell")(), i = n.getData(), o = ot({
|
|
25710
|
+
const t = te(), e = Ke("cellId"), n = Ke("getCurCell")(), i = n.getData() || {}, o = ot({
|
|
25704
25711
|
name: ((r = n.getData()) == null ? void 0 : r.name) || "",
|
|
25705
25712
|
x: n.position().x,
|
|
25706
25713
|
y: n.position().y,
|
|
25707
25714
|
width: n.size().width,
|
|
25708
25715
|
height: n.size().height,
|
|
25709
25716
|
zIndex: n.prop("zIndex"),
|
|
25710
|
-
opacity:
|
|
25717
|
+
opacity: i.opacity || 1,
|
|
25711
25718
|
borderStyle: i.borderStyle,
|
|
25712
25719
|
borderRadius: i.borderRadius,
|
|
25713
25720
|
borderWidth: i.borderWidth,
|