@html-graph/html-graph 7.0.1 → 7.1.0
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/html-graph.js +183 -183
- package/dist/html-graph.umd.cjs +1 -1
- package/package.json +1 -1
package/dist/html-graph.js
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var o = (r, e, t) =>
|
|
1
|
+
var Fe = Object.defineProperty;
|
|
2
|
+
var Oe = (r, e, t) => e in r ? Fe(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
|
|
3
|
+
var o = (r, e, t) => Oe(r, typeof e != "symbol" ? e + "" : e, t);
|
|
4
4
|
const D = (r, e) => ({
|
|
5
5
|
x: r.scale * e.x + r.x,
|
|
6
6
|
y: r.scale * e.y + r.y
|
|
7
7
|
});
|
|
8
8
|
var C = /* @__PURE__ */ ((r) => (r.Line = "line", r.NodeCycle = "node-cycle", r.PortCycle = "port-cycle", r))(C || {});
|
|
9
|
-
const
|
|
9
|
+
const We = () => {
|
|
10
10
|
const r = document.createElement("div");
|
|
11
11
|
return r.style.width = "100%", r.style.height = "100%", r.style.position = "relative", r.style.overflow = "hidden", r;
|
|
12
|
-
},
|
|
12
|
+
}, ke = () => {
|
|
13
13
|
const r = document.createElement("div");
|
|
14
14
|
return r.style.position = "absolute", r.style.top = "0", r.style.left = "0", r.style.width = "0", r.style.height = "0", r;
|
|
15
|
-
},
|
|
15
|
+
}, ze = (r) => {
|
|
16
16
|
r.style.position = "absolute", r.style.top = "0", r.style.left = "0", r.style.visibility = "hidden";
|
|
17
17
|
};
|
|
18
18
|
class me {
|
|
19
19
|
constructor(e, t, s) {
|
|
20
|
-
o(this, "host",
|
|
21
|
-
o(this, "container",
|
|
20
|
+
o(this, "host", We());
|
|
21
|
+
o(this, "container", ke());
|
|
22
22
|
o(this, "edgeIdToElementMap", /* @__PURE__ */ new Map());
|
|
23
23
|
o(this, "attachedNodeIds", /* @__PURE__ */ new Set());
|
|
24
24
|
o(this, "applyTransform", () => {
|
|
@@ -29,7 +29,7 @@ class me {
|
|
|
29
29
|
}
|
|
30
30
|
attachNode(e) {
|
|
31
31
|
const t = this.graphStore.getNode(e);
|
|
32
|
-
|
|
32
|
+
ze(t.element), this.attachedNodeIds.add(e), this.container.appendChild(t.element), this.updateNodePosition(e), this.updateNodePriority(e), t.element.style.visibility = "visible";
|
|
33
33
|
}
|
|
34
34
|
detachNode(e) {
|
|
35
35
|
const t = this.graphStore.getNode(e);
|
|
@@ -100,7 +100,7 @@ class me {
|
|
|
100
100
|
};
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
|
-
class
|
|
103
|
+
class Xe {
|
|
104
104
|
constructor(e) {
|
|
105
105
|
o(this, "xFrom", 1 / 0);
|
|
106
106
|
o(this, "yFrom", 1 / 0);
|
|
@@ -120,7 +120,7 @@ class ze {
|
|
|
120
120
|
return h <= this.xTo && d >= this.xFrom && c <= this.yTo && g >= this.yFrom;
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
|
-
class
|
|
123
|
+
class Ye {
|
|
124
124
|
constructor(e, t, s, i) {
|
|
125
125
|
o(this, "attachedNodes", /* @__PURE__ */ new Set());
|
|
126
126
|
o(this, "attachedEdges", /* @__PURE__ */ new Set());
|
|
@@ -144,7 +144,7 @@ class Xe {
|
|
|
144
144
|
this.handleAttachEdge(a);
|
|
145
145
|
});
|
|
146
146
|
});
|
|
147
|
-
this.htmlView = e, this.graphStore = t, this.trigger = s, this.params = i, this.renderingBox = new
|
|
147
|
+
this.htmlView = e, this.graphStore = t, this.trigger = s, this.params = i, this.renderingBox = new Xe(this.graphStore), this.trigger.subscribe(this.updateViewport);
|
|
148
148
|
}
|
|
149
149
|
attachNode(e) {
|
|
150
150
|
this.renderingBox.hasNode(e) && this.handleAttachNode(e);
|
|
@@ -198,7 +198,7 @@ class Xe {
|
|
|
198
198
|
this.htmlView.detachEdge(e), this.attachedEdges.delete(e);
|
|
199
199
|
}
|
|
200
200
|
}
|
|
201
|
-
class
|
|
201
|
+
class He {
|
|
202
202
|
constructor(e, t) {
|
|
203
203
|
o(this, "deferredNodes", /* @__PURE__ */ new Set());
|
|
204
204
|
o(this, "deferredEdges", /* @__PURE__ */ new Set());
|
|
@@ -510,7 +510,7 @@ class ve {
|
|
|
510
510
|
), this.graphStore.onBeforeEdgeRemoved.unsubscribe(this.onBeforeEdgeRemoved), this.graphStore.onBeforeClear.unsubscribe(this.onBeforeClear), this.htmlView.destroy(), this.destroyed = !0);
|
|
511
511
|
}
|
|
512
512
|
}
|
|
513
|
-
class
|
|
513
|
+
class je {
|
|
514
514
|
constructor() {
|
|
515
515
|
o(this, "singleToMultiMap", /* @__PURE__ */ new Map());
|
|
516
516
|
o(this, "multiToSingleMap", /* @__PURE__ */ new Map());
|
|
@@ -559,7 +559,7 @@ class Ee {
|
|
|
559
559
|
o(this, "portIncomingEdges", /* @__PURE__ */ new Map());
|
|
560
560
|
o(this, "portOutcomingEdges", /* @__PURE__ */ new Map());
|
|
561
561
|
o(this, "portCycleEdges", /* @__PURE__ */ new Map());
|
|
562
|
-
o(this, "elementPorts", new
|
|
562
|
+
o(this, "elementPorts", new je());
|
|
563
563
|
o(this, "afterNodeAddedEmitter");
|
|
564
564
|
o(this, "onAfterNodeAdded");
|
|
565
565
|
o(this, "afterNodeUpdatedEmitter");
|
|
@@ -766,7 +766,7 @@ const ce = (r) => ({
|
|
|
766
766
|
x: 0,
|
|
767
767
|
y: 0
|
|
768
768
|
};
|
|
769
|
-
class
|
|
769
|
+
class Ge {
|
|
770
770
|
constructor() {
|
|
771
771
|
o(this, "viewportMatrix", le);
|
|
772
772
|
o(this, "contentMatrix", le);
|
|
@@ -825,10 +825,10 @@ class K {
|
|
|
825
825
|
this.canvas.updateNode(t);
|
|
826
826
|
}
|
|
827
827
|
}
|
|
828
|
-
const
|
|
828
|
+
const Ke = (r, e, t) => {
|
|
829
829
|
const { x: s, y: i, width: n, height: a } = r.getBoundingClientRect();
|
|
830
830
|
return e >= s && e <= s + n && t >= i && t <= i + a;
|
|
831
|
-
},
|
|
831
|
+
}, Ze = (r, e, t) => e >= 0 && e <= r.innerWidth && t >= 0 && t <= r.innerHeight, V = (r, e, t, s) => Ke(e, t, s) && Ze(r, t, s), B = (r, e) => {
|
|
832
832
|
e !== null ? r.style.cursor = e : r.style.removeProperty("cursor");
|
|
833
833
|
}, F = (r) => {
|
|
834
834
|
const e = document.createElement("div");
|
|
@@ -845,22 +845,22 @@ const Ge = (r, e, t) => {
|
|
|
845
845
|
}
|
|
846
846
|
]
|
|
847
847
|
};
|
|
848
|
-
},
|
|
848
|
+
}, Je = (r, e) => {
|
|
849
849
|
let t = e, s = null;
|
|
850
850
|
for (; t !== null && (s = r.getElementPortIds(t)[0] ?? null, s === null); )
|
|
851
851
|
t = t.parentElement;
|
|
852
852
|
return s;
|
|
853
|
-
}, Ae = (r, e) => {
|
|
854
|
-
const t = document
|
|
853
|
+
}, Ae = (r, e) => r.elementsFromPoint(e.x, e.y).map((t) => t.shadowRoot !== null ? [...Ae(t.shadowRoot, e), t] : [t]).flat(), xe = (r, e) => {
|
|
854
|
+
const t = Ae(document, e);
|
|
855
855
|
for (const s of t) {
|
|
856
|
-
const i =
|
|
856
|
+
const i = Je(r, s);
|
|
857
857
|
if (i !== null)
|
|
858
858
|
return i;
|
|
859
859
|
}
|
|
860
860
|
return null;
|
|
861
861
|
};
|
|
862
862
|
var b = /* @__PURE__ */ ((r) => (r.Static = "static", r.Dragging = "dragging", r.Edge = "edge", r))(b || {});
|
|
863
|
-
const
|
|
863
|
+
const Se = (r, e) => ({
|
|
864
864
|
x: r / 2,
|
|
865
865
|
y: e / 2
|
|
866
866
|
}), p = {
|
|
@@ -869,7 +869,7 @@ const xe = (r, e) => ({
|
|
|
869
869
|
}, m = (r, e, t) => ({
|
|
870
870
|
x: e.x * r.x - e.y * r.y + ((1 - e.x) * t.x + e.y * t.y),
|
|
871
871
|
y: e.y * r.x + e.x * r.y + ((1 - e.x) * t.y - e.y * t.x)
|
|
872
|
-
}),
|
|
872
|
+
}), Pe = (r, e) => {
|
|
873
873
|
const t = {
|
|
874
874
|
x: r.x + r.width / 2,
|
|
875
875
|
y: r.y + r.height / 2
|
|
@@ -889,7 +889,7 @@ const xe = (r, e) => ({
|
|
|
889
889
|
x: e * r.x + (1 - e) / 2 * s.x,
|
|
890
890
|
y: t * r.y + (1 - t) / 2 * s.y
|
|
891
891
|
});
|
|
892
|
-
class
|
|
892
|
+
class Qe {
|
|
893
893
|
constructor(e) {
|
|
894
894
|
o(this, "path");
|
|
895
895
|
o(this, "midpoint");
|
|
@@ -914,7 +914,7 @@ class Je {
|
|
|
914
914
|
this.path = `${d}${h}${c}`;
|
|
915
915
|
}
|
|
916
916
|
}
|
|
917
|
-
class
|
|
917
|
+
class qe {
|
|
918
918
|
constructor(e) {
|
|
919
919
|
o(this, "path");
|
|
920
920
|
o(this, "midpoint");
|
|
@@ -971,19 +971,19 @@ class Qe {
|
|
|
971
971
|
}
|
|
972
972
|
const Z = Object.freeze({
|
|
973
973
|
edgeColor: "--edge-color"
|
|
974
|
-
}),
|
|
974
|
+
}), be = (r) => {
|
|
975
975
|
const e = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
976
976
|
return e.style.pointerEvents = "none", e.style.position = "absolute", e.style.top = "0", e.style.left = "0", e.style.overflow = "visible", e.style.setProperty(Z.edgeColor, r), e;
|
|
977
|
-
},
|
|
977
|
+
}, Te = (r) => {
|
|
978
978
|
const e = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
979
979
|
return e.setAttribute("stroke", `var(${Z.edgeColor})`), e.setAttribute("stroke-width", `${r}`), e.setAttribute("fill", "none"), e;
|
|
980
980
|
}, O = () => {
|
|
981
981
|
const r = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
982
982
|
return r.setAttribute("fill", `var(${Z.edgeColor})`), r;
|
|
983
|
-
},
|
|
983
|
+
}, De = () => {
|
|
984
984
|
const r = document.createElementNS("http://www.w3.org/2000/svg", "g");
|
|
985
985
|
return r.style.transformOrigin = "50% 50%", r;
|
|
986
|
-
},
|
|
986
|
+
}, Ne = (r, e) => {
|
|
987
987
|
r.style.transform = `translate(${e.x}px, ${e.y}px)`, r.style.width = `${Math.max(e.width, 1)}px`, r.style.height = `${Math.max(e.height, 1)}px`;
|
|
988
988
|
}, L = (r, e) => {
|
|
989
989
|
const t = [];
|
|
@@ -1005,7 +1005,7 @@ const Z = Object.freeze({
|
|
|
1005
1005
|
}
|
|
1006
1006
|
return t.join(" ");
|
|
1007
1007
|
};
|
|
1008
|
-
class
|
|
1008
|
+
class _e {
|
|
1009
1009
|
constructor(e) {
|
|
1010
1010
|
o(this, "path");
|
|
1011
1011
|
o(this, "midpoint");
|
|
@@ -1044,7 +1044,7 @@ class qe {
|
|
|
1044
1044
|
);
|
|
1045
1045
|
}
|
|
1046
1046
|
}
|
|
1047
|
-
class
|
|
1047
|
+
class et {
|
|
1048
1048
|
constructor(e) {
|
|
1049
1049
|
o(this, "path");
|
|
1050
1050
|
o(this, "midpoint");
|
|
@@ -1075,7 +1075,7 @@ class _e {
|
|
|
1075
1075
|
);
|
|
1076
1076
|
}
|
|
1077
1077
|
}
|
|
1078
|
-
class
|
|
1078
|
+
class tt {
|
|
1079
1079
|
constructor(e) {
|
|
1080
1080
|
o(this, "path");
|
|
1081
1081
|
o(this, "midpoint");
|
|
@@ -1105,7 +1105,7 @@ class et {
|
|
|
1105
1105
|
this.path = L([s, a, h, i], this.params.roundness);
|
|
1106
1106
|
}
|
|
1107
1107
|
}
|
|
1108
|
-
class
|
|
1108
|
+
class rt {
|
|
1109
1109
|
constructor(e) {
|
|
1110
1110
|
o(this, "path");
|
|
1111
1111
|
o(this, "midpoint");
|
|
@@ -1164,7 +1164,7 @@ class J {
|
|
|
1164
1164
|
this.path = `${this.params.hasSourceArrow || this.params.hasTargetArrow ? "" : d}${L(h, this.params.roundness)}`, this.midpoint = { x: (h[3].x + h[4].x) / 2, y: (h[3].y + h[4].y) / 2 };
|
|
1165
1165
|
}
|
|
1166
1166
|
}
|
|
1167
|
-
class
|
|
1167
|
+
class st {
|
|
1168
1168
|
constructor(e) {
|
|
1169
1169
|
o(this, "path");
|
|
1170
1170
|
o(this, "midpoint");
|
|
@@ -1185,7 +1185,7 @@ class rt {
|
|
|
1185
1185
|
this.path = `${this.params.hasSourceArrow || this.params.hasTargetArrow ? "" : w}${u}`, this.midpoint = l[3];
|
|
1186
1186
|
}
|
|
1187
1187
|
}
|
|
1188
|
-
class
|
|
1188
|
+
class ot {
|
|
1189
1189
|
constructor(e) {
|
|
1190
1190
|
o(this, "path");
|
|
1191
1191
|
o(this, "midpoint");
|
|
@@ -1221,7 +1221,7 @@ class st {
|
|
|
1221
1221
|
};
|
|
1222
1222
|
}
|
|
1223
1223
|
}
|
|
1224
|
-
class
|
|
1224
|
+
class it {
|
|
1225
1225
|
constructor(e) {
|
|
1226
1226
|
o(this, "path");
|
|
1227
1227
|
o(this, "midpoint");
|
|
@@ -1262,7 +1262,7 @@ class ot {
|
|
|
1262
1262
|
);
|
|
1263
1263
|
}
|
|
1264
1264
|
}
|
|
1265
|
-
class
|
|
1265
|
+
class nt {
|
|
1266
1266
|
constructor(e) {
|
|
1267
1267
|
o(this, "path");
|
|
1268
1268
|
o(this, "midpoint");
|
|
@@ -1329,21 +1329,21 @@ const f = Object.freeze({
|
|
|
1329
1329
|
class k {
|
|
1330
1330
|
constructor(e) {
|
|
1331
1331
|
o(this, "svg");
|
|
1332
|
-
o(this, "group",
|
|
1332
|
+
o(this, "group", De());
|
|
1333
1333
|
o(this, "line");
|
|
1334
1334
|
o(this, "sourceArrow", null);
|
|
1335
1335
|
o(this, "targetArrow", null);
|
|
1336
1336
|
o(this, "onAfterRender");
|
|
1337
1337
|
o(this, "afterRenderEmitter");
|
|
1338
1338
|
o(this, "arrowRenderer");
|
|
1339
|
-
this.params = e, [this.afterRenderEmitter, this.onAfterRender] = x(), this.arrowRenderer = this.params.arrowRenderer, this.svg =
|
|
1339
|
+
this.params = e, [this.afterRenderEmitter, this.onAfterRender] = x(), this.arrowRenderer = this.params.arrowRenderer, this.svg = be(e.color), this.svg.appendChild(this.group), this.line = Te(e.width), this.group.appendChild(this.line), e.hasSourceArrow && (this.sourceArrow = O(), this.group.appendChild(this.sourceArrow)), e.hasTargetArrow && (this.targetArrow = O(), this.group.appendChild(this.targetArrow));
|
|
1340
1340
|
}
|
|
1341
1341
|
render(e) {
|
|
1342
|
-
const { x: t, y: s, width: i, height: n, flipX: a, flipY: h } =
|
|
1342
|
+
const { x: t, y: s, width: i, height: n, flipX: a, flipY: h } = Pe(
|
|
1343
1343
|
e.from,
|
|
1344
1344
|
e.to
|
|
1345
1345
|
);
|
|
1346
|
-
|
|
1346
|
+
Ne(this.svg, { x: t, y: s, width: i, height: n }), this.group.style.transform = `scale(${a}, ${h})`;
|
|
1347
1347
|
const d = ge(
|
|
1348
1348
|
e.from.direction,
|
|
1349
1349
|
a,
|
|
@@ -1384,7 +1384,7 @@ class k {
|
|
|
1384
1384
|
});
|
|
1385
1385
|
}
|
|
1386
1386
|
}
|
|
1387
|
-
const
|
|
1387
|
+
const at = (r) => (e) => {
|
|
1388
1388
|
const s = [
|
|
1389
1389
|
p,
|
|
1390
1390
|
{ x: e.arrowLength, y: r.radius },
|
|
@@ -1396,7 +1396,7 @@ const nt = (r) => (e) => {
|
|
|
1396
1396
|
y: h.y + e.shift.y
|
|
1397
1397
|
})), i = `M ${s[0].x} ${s[0].y}`, n = `L ${s[1].x} ${s[1].y}`, a = `L ${s[2].x} ${s[2].y}`;
|
|
1398
1398
|
return `${i} ${n} ${a} Z`;
|
|
1399
|
-
},
|
|
1399
|
+
}, ht = (r) => (e) => {
|
|
1400
1400
|
const t = r.radius, s = e.arrowLength, i = (s * s + 2 * s * t) / (2 * t), n = i + t, a = s + t - t * (s + t) / n, h = t * i / n, c = [p, { x: a, y: -h }, { x: a, y: h }].map(
|
|
1401
1401
|
(y) => m(y, e.direction, p)
|
|
1402
1402
|
).map((y) => ({
|
|
@@ -1404,7 +1404,7 @@ const nt = (r) => (e) => {
|
|
|
1404
1404
|
y: y.y + e.shift.y
|
|
1405
1405
|
})), g = `M ${c[0].x} ${c[0].y}`, l = `A ${i} ${i} 0 0 0 ${c[1].x} ${c[1].y}`, u = `A ${t} ${t} 0 0 0 ${c[2].x} ${c[2].y}`, w = `A ${i} ${i} 0 0 0 ${c[0].x} ${c[0].y}`;
|
|
1406
1406
|
return `${g} ${l} ${u} ${w}`;
|
|
1407
|
-
},
|
|
1407
|
+
}, dt = (r) => (e) => {
|
|
1408
1408
|
const t = r.smallRadius, s = r.radius, i = m(
|
|
1409
1409
|
{
|
|
1410
1410
|
x: e.arrowLength,
|
|
@@ -1430,22 +1430,22 @@ const nt = (r) => (e) => {
|
|
|
1430
1430
|
return r;
|
|
1431
1431
|
switch (r.type) {
|
|
1432
1432
|
case "triangle":
|
|
1433
|
-
return
|
|
1433
|
+
return at({
|
|
1434
1434
|
radius: r.radius ?? f.polygonArrowRadius
|
|
1435
1435
|
});
|
|
1436
1436
|
case "arc":
|
|
1437
|
-
return
|
|
1437
|
+
return ht({
|
|
1438
1438
|
radius: r.radius ?? f.circleArrowRadius
|
|
1439
1439
|
});
|
|
1440
1440
|
default:
|
|
1441
|
-
return
|
|
1441
|
+
return dt({
|
|
1442
1442
|
smallRadius: r.smallRadius ?? f.wedgeArrowSmallRadius,
|
|
1443
1443
|
angle: r.angle ?? f.wedgeArrowAngle,
|
|
1444
1444
|
radius: r.radius ?? f.wedgeArrowRadius
|
|
1445
1445
|
});
|
|
1446
1446
|
}
|
|
1447
1447
|
};
|
|
1448
|
-
class
|
|
1448
|
+
class ct {
|
|
1449
1449
|
constructor(e) {
|
|
1450
1450
|
o(this, "svg");
|
|
1451
1451
|
o(this, "group");
|
|
@@ -1462,7 +1462,7 @@ class dt {
|
|
|
1462
1462
|
o(this, "hasSourceArrow");
|
|
1463
1463
|
o(this, "hasTargetArrow");
|
|
1464
1464
|
o(this, "pathShape");
|
|
1465
|
-
o(this, "createCyclePath", (e) => new
|
|
1465
|
+
o(this, "createCyclePath", (e) => new st({
|
|
1466
1466
|
sourceDirection: e,
|
|
1467
1467
|
radius: this.portCycleRadius,
|
|
1468
1468
|
smallRadius: this.portCycleSmallRadius,
|
|
@@ -1470,7 +1470,7 @@ class dt {
|
|
|
1470
1470
|
hasSourceArrow: this.hasSourceArrow,
|
|
1471
1471
|
hasTargetArrow: this.hasTargetArrow
|
|
1472
1472
|
}));
|
|
1473
|
-
o(this, "createDetourPath", (e, t, s, i, n) => new
|
|
1473
|
+
o(this, "createDetourPath", (e, t, s, i, n) => new qe({
|
|
1474
1474
|
to: s,
|
|
1475
1475
|
sourceDirection: e,
|
|
1476
1476
|
targetDirection: t,
|
|
@@ -1483,7 +1483,7 @@ class dt {
|
|
|
1483
1483
|
hasSourceArrow: this.hasSourceArrow,
|
|
1484
1484
|
hasTargetArrow: this.hasTargetArrow
|
|
1485
1485
|
}));
|
|
1486
|
-
o(this, "createLinePath", (e, t, s) => new
|
|
1486
|
+
o(this, "createLinePath", (e, t, s) => new Qe({
|
|
1487
1487
|
to: s,
|
|
1488
1488
|
sourceDirection: e,
|
|
1489
1489
|
targetDirection: t,
|
|
@@ -1508,7 +1508,7 @@ class dt {
|
|
|
1508
1508
|
this.pathShape.render(e);
|
|
1509
1509
|
}
|
|
1510
1510
|
}
|
|
1511
|
-
class
|
|
1511
|
+
class lt {
|
|
1512
1512
|
constructor(e) {
|
|
1513
1513
|
o(this, "svg");
|
|
1514
1514
|
o(this, "group");
|
|
@@ -1533,7 +1533,7 @@ class ct {
|
|
|
1533
1533
|
hasSourceArrow: this.hasSourceArrow,
|
|
1534
1534
|
hasTargetArrow: this.hasTargetArrow
|
|
1535
1535
|
}));
|
|
1536
|
-
o(this, "createDetourPath", (e, t, s, i, n) => new
|
|
1536
|
+
o(this, "createDetourPath", (e, t, s, i, n) => new it({
|
|
1537
1537
|
to: s,
|
|
1538
1538
|
sourceDirection: e,
|
|
1539
1539
|
targetDirection: t,
|
|
@@ -1546,7 +1546,7 @@ class ct {
|
|
|
1546
1546
|
hasSourceArrow: this.hasSourceArrow,
|
|
1547
1547
|
hasTargetArrow: this.hasTargetArrow
|
|
1548
1548
|
}));
|
|
1549
|
-
o(this, "createLinePath", (e, t, s, i) => new
|
|
1549
|
+
o(this, "createLinePath", (e, t, s, i) => new _e({
|
|
1550
1550
|
to: s,
|
|
1551
1551
|
sourceDirection: e,
|
|
1552
1552
|
targetDirection: t,
|
|
@@ -1579,7 +1579,7 @@ class ct {
|
|
|
1579
1579
|
this.pathShape.render(e);
|
|
1580
1580
|
}
|
|
1581
1581
|
}
|
|
1582
|
-
class
|
|
1582
|
+
class gt {
|
|
1583
1583
|
constructor(e) {
|
|
1584
1584
|
o(this, "svg");
|
|
1585
1585
|
o(this, "group");
|
|
@@ -1605,7 +1605,7 @@ class lt {
|
|
|
1605
1605
|
hasSourceArrow: this.hasSourceArrow,
|
|
1606
1606
|
hasTargetArrow: this.hasTargetArrow
|
|
1607
1607
|
}));
|
|
1608
|
-
o(this, "createDetourPath", (e, t, s, i, n) => new
|
|
1608
|
+
o(this, "createDetourPath", (e, t, s, i, n) => new et({
|
|
1609
1609
|
to: s,
|
|
1610
1610
|
sourceDirection: e,
|
|
1611
1611
|
targetDirection: t,
|
|
@@ -1619,7 +1619,7 @@ class lt {
|
|
|
1619
1619
|
hasSourceArrow: this.hasSourceArrow,
|
|
1620
1620
|
hasTargetArrow: this.hasTargetArrow
|
|
1621
1621
|
}));
|
|
1622
|
-
o(this, "createLinePath", (e, t, s) => new
|
|
1622
|
+
o(this, "createLinePath", (e, t, s) => new tt({
|
|
1623
1623
|
to: s,
|
|
1624
1624
|
sourceDirection: e,
|
|
1625
1625
|
targetDirection: t,
|
|
@@ -1651,7 +1651,7 @@ class lt {
|
|
|
1651
1651
|
this.pathShape.render(e);
|
|
1652
1652
|
}
|
|
1653
1653
|
}
|
|
1654
|
-
class
|
|
1654
|
+
class ut {
|
|
1655
1655
|
constructor(e) {
|
|
1656
1656
|
o(this, "svg");
|
|
1657
1657
|
o(this, "group");
|
|
@@ -1676,7 +1676,7 @@ class gt {
|
|
|
1676
1676
|
hasSourceArrow: this.hasSourceArrow,
|
|
1677
1677
|
hasTargetArrow: this.hasTargetArrow
|
|
1678
1678
|
}));
|
|
1679
|
-
o(this, "createDetourPath", (e, t, s, i, n) => new
|
|
1679
|
+
o(this, "createDetourPath", (e, t, s, i, n) => new nt({
|
|
1680
1680
|
to: s,
|
|
1681
1681
|
sourceDirection: e,
|
|
1682
1682
|
targetDirection: t,
|
|
@@ -1689,7 +1689,7 @@ class gt {
|
|
|
1689
1689
|
hasSourceArrow: this.hasSourceArrow,
|
|
1690
1690
|
hasTargetArrow: this.hasTargetArrow
|
|
1691
1691
|
}));
|
|
1692
|
-
o(this, "createLinePath", (e, t, s, i, n) => new
|
|
1692
|
+
o(this, "createLinePath", (e, t, s, i, n) => new rt({
|
|
1693
1693
|
to: s,
|
|
1694
1694
|
sourceDirection: e,
|
|
1695
1695
|
targetDirection: t,
|
|
@@ -1722,10 +1722,10 @@ class gt {
|
|
|
1722
1722
|
this.pathShape.render(e);
|
|
1723
1723
|
}
|
|
1724
1724
|
}
|
|
1725
|
-
class
|
|
1725
|
+
class Me {
|
|
1726
1726
|
constructor(e) {
|
|
1727
1727
|
o(this, "svg");
|
|
1728
|
-
o(this, "group",
|
|
1728
|
+
o(this, "group", De());
|
|
1729
1729
|
o(this, "line");
|
|
1730
1730
|
o(this, "sourceArrow", null);
|
|
1731
1731
|
o(this, "targetArrow", null);
|
|
@@ -1737,15 +1737,15 @@ class Ne {
|
|
|
1737
1737
|
o(this, "onAfterRender");
|
|
1738
1738
|
o(this, "afterRenderEmitter");
|
|
1739
1739
|
o(this, "arrowRenderer");
|
|
1740
|
-
[this.afterRenderEmitter, this.onAfterRender] = x(), this.color = (e == null ? void 0 : e.color) ?? f.color, this.width = (e == null ? void 0 : e.width) ?? f.width, this.arrowLength = (e == null ? void 0 : e.arrowLength) ?? f.arrowLength, this.arrowRenderer = I((e == null ? void 0 : e.arrowRenderer) ?? {}), this.sourceOffset = (e == null ? void 0 : e.sourceOffset) ?? f.preOffset, this.targetOffset = (e == null ? void 0 : e.targetOffset) ?? f.preOffset, this.svg =
|
|
1740
|
+
[this.afterRenderEmitter, this.onAfterRender] = x(), this.color = (e == null ? void 0 : e.color) ?? f.color, this.width = (e == null ? void 0 : e.width) ?? f.width, this.arrowLength = (e == null ? void 0 : e.arrowLength) ?? f.arrowLength, this.arrowRenderer = I((e == null ? void 0 : e.arrowRenderer) ?? {}), this.sourceOffset = (e == null ? void 0 : e.sourceOffset) ?? f.preOffset, this.targetOffset = (e == null ? void 0 : e.targetOffset) ?? f.preOffset, this.svg = be(this.color), this.svg.appendChild(this.group), this.line = Te(this.width), this.group.appendChild(this.line), e != null && e.hasSourceArrow && (this.sourceArrow = O(), this.group.appendChild(this.sourceArrow)), e != null && e.hasTargetArrow && (this.targetArrow = O(), this.group.appendChild(this.targetArrow));
|
|
1741
1741
|
}
|
|
1742
1742
|
render(e) {
|
|
1743
|
-
const { x: t, y: s, width: i, height: n, flipX: a, flipY: h } =
|
|
1743
|
+
const { x: t, y: s, width: i, height: n, flipX: a, flipY: h } = Pe(
|
|
1744
1744
|
e.from,
|
|
1745
1745
|
e.to
|
|
1746
1746
|
);
|
|
1747
|
-
|
|
1748
|
-
const d = { x: i, y: n }, c = new
|
|
1747
|
+
Ne(this.svg, { x: t, y: s, width: i, height: n }), this.group.style.transform = `scale(${a}, ${h})`;
|
|
1748
|
+
const d = { x: i, y: n }, c = new ot({
|
|
1749
1749
|
to: d,
|
|
1750
1750
|
sourceOffset: this.sourceOffset,
|
|
1751
1751
|
targetOffset: this.targetOffset,
|
|
@@ -1796,40 +1796,40 @@ class Ne {
|
|
|
1796
1796
|
});
|
|
1797
1797
|
}
|
|
1798
1798
|
}
|
|
1799
|
-
const
|
|
1799
|
+
const pt = () => {
|
|
1800
1800
|
const r = document.createElementNS("http://www.w3.org/2000/svg", "g");
|
|
1801
1801
|
return r.style.pointerEvents = "auto", r.style.cursor = "pointer", r;
|
|
1802
|
-
},
|
|
1802
|
+
}, wt = (r) => {
|
|
1803
1803
|
const e = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
1804
1804
|
return e.setAttribute("stroke", "transparent"), e.setAttribute("stroke-width", `${r}`), e.setAttribute("fill", "none"), e.setAttribute("stroke-linecap", "round"), e;
|
|
1805
1805
|
}, ue = (r) => {
|
|
1806
1806
|
const e = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
1807
1807
|
return e.setAttribute("stroke-linejoin", "round"), e.setAttribute("stroke-width", `${r}`), e.setAttribute("fill", "transparent"), e.setAttribute("stroke", "transparent"), e;
|
|
1808
1808
|
};
|
|
1809
|
-
class
|
|
1809
|
+
class ft extends Error {
|
|
1810
1810
|
constructor(e) {
|
|
1811
1811
|
super(e), this.name = "InteractiveEdgeError";
|
|
1812
1812
|
}
|
|
1813
1813
|
}
|
|
1814
|
-
class
|
|
1814
|
+
class Le {
|
|
1815
1815
|
constructor(e, t) {
|
|
1816
1816
|
o(this, "svg");
|
|
1817
1817
|
o(this, "group");
|
|
1818
1818
|
o(this, "line");
|
|
1819
1819
|
o(this, "sourceArrow");
|
|
1820
1820
|
o(this, "targetArrow");
|
|
1821
|
-
o(this, "handle",
|
|
1821
|
+
o(this, "handle", pt());
|
|
1822
1822
|
o(this, "onAfterRender");
|
|
1823
1823
|
o(this, "interactiveLine");
|
|
1824
1824
|
o(this, "interactiveSourceArrow", null);
|
|
1825
1825
|
o(this, "interactiveTargetArrow", null);
|
|
1826
|
-
if (this.baseEdge = e, e instanceof
|
|
1827
|
-
throw new
|
|
1826
|
+
if (this.baseEdge = e, e instanceof Le)
|
|
1827
|
+
throw new ft(
|
|
1828
1828
|
"interactive edge can be configured only once"
|
|
1829
1829
|
);
|
|
1830
1830
|
this.svg = this.baseEdge.svg, this.group = this.baseEdge.group, this.line = this.baseEdge.line, this.sourceArrow = this.baseEdge.sourceArrow, this.targetArrow = this.baseEdge.targetArrow, this.onAfterRender = this.baseEdge.onAfterRender;
|
|
1831
1831
|
const s = (t == null ? void 0 : t.distance) ?? f.interactiveWidth;
|
|
1832
|
-
this.interactiveLine =
|
|
1832
|
+
this.interactiveLine = wt(s), this.handle.appendChild(this.interactiveLine), this.sourceArrow && (this.interactiveSourceArrow = ue(s), this.handle.appendChild(this.interactiveSourceArrow)), this.targetArrow && (this.interactiveTargetArrow = ue(s), this.handle.appendChild(this.interactiveTargetArrow)), this.group.appendChild(this.handle), this.baseEdge.onAfterRender.subscribe((i) => {
|
|
1833
1833
|
this.interactiveLine.setAttribute("d", i.edgePath.path), this.interactiveSourceArrow && this.interactiveSourceArrow.setAttribute("d", i.sourceArrowPath), this.interactiveTargetArrow && this.interactiveTargetArrow.setAttribute("d", i.targetArrowPath);
|
|
1834
1834
|
});
|
|
1835
1835
|
}
|
|
@@ -1837,7 +1837,7 @@ class Me {
|
|
|
1837
1837
|
this.baseEdge.render(e);
|
|
1838
1838
|
}
|
|
1839
1839
|
}
|
|
1840
|
-
class
|
|
1840
|
+
class Qt {
|
|
1841
1841
|
constructor(e, t) {
|
|
1842
1842
|
o(this, "group");
|
|
1843
1843
|
o(this, "line");
|
|
@@ -1854,7 +1854,7 @@ class Jt {
|
|
|
1854
1854
|
this.baseShape.render(e);
|
|
1855
1855
|
}
|
|
1856
1856
|
}
|
|
1857
|
-
class
|
|
1857
|
+
class Re {
|
|
1858
1858
|
constructor(e) {
|
|
1859
1859
|
o(this, "onAfterNodeAdded");
|
|
1860
1860
|
o(this, "onAfterNodeUpdated");
|
|
@@ -1947,7 +1947,7 @@ class Le {
|
|
|
1947
1947
|
return this.graphStore.getNode(e) === void 0 ? null : this.graphStore.getNodeAdjacentEdgeIds(e);
|
|
1948
1948
|
}
|
|
1949
1949
|
}
|
|
1950
|
-
class
|
|
1950
|
+
class Ce {
|
|
1951
1951
|
constructor(e) {
|
|
1952
1952
|
o(this, "onAfterUpdated");
|
|
1953
1953
|
this.viewportStore = e, this.onAfterUpdated = this.viewportStore.onAfterUpdated;
|
|
@@ -1959,14 +1959,14 @@ class Re {
|
|
|
1959
1959
|
return { ...this.viewportStore.getContentMatrix() };
|
|
1960
1960
|
}
|
|
1961
1961
|
}
|
|
1962
|
-
const
|
|
1963
|
-
const t = new Ee(), s = new
|
|
1962
|
+
const Ve = (r, e) => {
|
|
1963
|
+
const t = new Ee(), s = new Re(t), i = new Ce(e), n = new me(t, e, r), a = {
|
|
1964
1964
|
nodes: {
|
|
1965
|
-
centerFn:
|
|
1965
|
+
centerFn: Se,
|
|
1966
1966
|
priorityFn: () => 0
|
|
1967
1967
|
},
|
|
1968
1968
|
edges: {
|
|
1969
|
-
shapeFactory: () => new
|
|
1969
|
+
shapeFactory: () => new Me(),
|
|
1970
1970
|
priorityFn: () => 0
|
|
1971
1971
|
},
|
|
1972
1972
|
ports: {
|
|
@@ -2279,11 +2279,11 @@ class Q {
|
|
|
2279
2279
|
return e;
|
|
2280
2280
|
}
|
|
2281
2281
|
}
|
|
2282
|
-
const
|
|
2282
|
+
const yt = (r, e, t) => ({
|
|
2283
2283
|
scale: r.scale,
|
|
2284
2284
|
x: r.x + r.scale * e,
|
|
2285
2285
|
y: r.y + r.scale * t
|
|
2286
|
-
}),
|
|
2286
|
+
}), mt = (r, e, t, s) => ({
|
|
2287
2287
|
scale: r.scale * e,
|
|
2288
2288
|
x: r.scale * (1 - e) * t + r.x,
|
|
2289
2289
|
y: r.scale * (1 - e) * s + r.y
|
|
@@ -2406,7 +2406,7 @@ class X {
|
|
|
2406
2406
|
new X(e, t, s, i);
|
|
2407
2407
|
}
|
|
2408
2408
|
moveViewport(e, t) {
|
|
2409
|
-
const s = this.viewport.getViewportMatrix(), i =
|
|
2409
|
+
const s = this.viewport.getViewportMatrix(), i = yt(s, e, t), { width: n, height: a } = this.element.getBoundingClientRect(), h = this.params.transformPreprocessor({
|
|
2410
2410
|
prevTransform: s,
|
|
2411
2411
|
nextTransform: i,
|
|
2412
2412
|
canvasWidth: n,
|
|
@@ -2415,7 +2415,7 @@ class X {
|
|
|
2415
2415
|
this.performTransform(h);
|
|
2416
2416
|
}
|
|
2417
2417
|
scaleViewport(e, t, s) {
|
|
2418
|
-
const i = this.canvas.viewport.getViewportMatrix(), n =
|
|
2418
|
+
const i = this.canvas.viewport.getViewportMatrix(), n = mt(i, e, t, s), { width: a, height: h } = this.element.getBoundingClientRect(), d = this.params.transformPreprocessor({
|
|
2419
2419
|
prevTransform: i,
|
|
2420
2420
|
nextTransform: n,
|
|
2421
2421
|
canvasWidth: a,
|
|
@@ -2527,13 +2527,13 @@ class q {
|
|
|
2527
2527
|
this.trigger.emit({ x: s, y: i, width: n, height: a });
|
|
2528
2528
|
}
|
|
2529
2529
|
}
|
|
2530
|
-
const
|
|
2530
|
+
const vt = () => {
|
|
2531
2531
|
const r = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
2532
2532
|
return r.style.position = "absolute", r.style.inset = "0", r;
|
|
2533
|
-
},
|
|
2533
|
+
}, Et = () => {
|
|
2534
2534
|
const r = document.createElementNS("http://www.w3.org/2000/svg", "rect");
|
|
2535
2535
|
return r.setAttribute("fill", "url(#pattern)"), r;
|
|
2536
|
-
},
|
|
2536
|
+
}, At = () => {
|
|
2537
2537
|
const r = document.createElementNS(
|
|
2538
2538
|
"http://www.w3.org/2000/svg",
|
|
2539
2539
|
"pattern"
|
|
@@ -2542,9 +2542,9 @@ const mt = () => {
|
|
|
2542
2542
|
};
|
|
2543
2543
|
class _ {
|
|
2544
2544
|
constructor(e, t, s) {
|
|
2545
|
-
o(this, "svg",
|
|
2546
|
-
o(this, "patternRenderingRectangle",
|
|
2547
|
-
o(this, "pattern",
|
|
2545
|
+
o(this, "svg", vt());
|
|
2546
|
+
o(this, "patternRenderingRectangle", Et());
|
|
2547
|
+
o(this, "pattern", At());
|
|
2548
2548
|
o(this, "patternContent");
|
|
2549
2549
|
o(this, "tileWidth");
|
|
2550
2550
|
o(this, "tileHeight");
|
|
@@ -2584,7 +2584,7 @@ class ee {
|
|
|
2584
2584
|
o(this, "onEdgeCreated", (e) => {
|
|
2585
2585
|
this.params.onAfterEdgeCreated(e);
|
|
2586
2586
|
});
|
|
2587
|
-
this.canvas = e, this.overlayLayer = t, this.viewportStore = s, this.window = i, this.params = n, this.overlayCanvas =
|
|
2587
|
+
this.canvas = e, this.overlayLayer = t, this.viewportStore = s, this.window = i, this.params = n, this.overlayCanvas = Ve(
|
|
2588
2588
|
this.overlayLayer,
|
|
2589
2589
|
this.viewportStore
|
|
2590
2590
|
), z.configure(
|
|
@@ -2649,7 +2649,7 @@ class ee {
|
|
|
2649
2649
|
this.staticPortId = null, this.isTargetDragging = !0, this.overlayCanvas.clear();
|
|
2650
2650
|
}
|
|
2651
2651
|
tryCreateConnection(e) {
|
|
2652
|
-
const t =
|
|
2652
|
+
const t = xe(this.canvas.graph, e), s = this.staticPortId;
|
|
2653
2653
|
if (t === null) {
|
|
2654
2654
|
this.params.onEdgeCreationInterrupted({
|
|
2655
2655
|
staticPortId: s,
|
|
@@ -2680,7 +2680,7 @@ class te {
|
|
|
2680
2680
|
o(this, "onEdgeReattached", (e) => {
|
|
2681
2681
|
this.params.onAfterEdgeReattached(e);
|
|
2682
2682
|
});
|
|
2683
|
-
this.canvas = e, this.overlayLayer = t, this.viewportStore = s, this.window = i, this.params = n, this.overlayCanvas =
|
|
2683
|
+
this.canvas = e, this.overlayLayer = t, this.viewportStore = s, this.window = i, this.params = n, this.overlayCanvas = Ve(
|
|
2684
2684
|
this.overlayLayer,
|
|
2685
2685
|
this.viewportStore
|
|
2686
2686
|
), z.configure(
|
|
@@ -2770,7 +2770,7 @@ class te {
|
|
|
2770
2770
|
});
|
|
2771
2771
|
}
|
|
2772
2772
|
tryCreateConnection(e) {
|
|
2773
|
-
const t =
|
|
2773
|
+
const t = xe(this.canvas.graph, e);
|
|
2774
2774
|
if (this.overlayCanvas.removeEdge(b.Edge), t === null) {
|
|
2775
2775
|
const d = this.draggingEdgePayload;
|
|
2776
2776
|
this.params.onEdgeReattachInterrupted({
|
|
@@ -2852,7 +2852,7 @@ class se {
|
|
|
2852
2852
|
});
|
|
2853
2853
|
}
|
|
2854
2854
|
}
|
|
2855
|
-
class
|
|
2855
|
+
class xt {
|
|
2856
2856
|
static configure(e, t) {
|
|
2857
2857
|
const s = t.applyOn;
|
|
2858
2858
|
switch (s.type) {
|
|
@@ -2874,7 +2874,7 @@ class At {
|
|
|
2874
2874
|
}
|
|
2875
2875
|
}
|
|
2876
2876
|
}
|
|
2877
|
-
class
|
|
2877
|
+
class St {
|
|
2878
2878
|
constructor(e, t) {
|
|
2879
2879
|
o(this, "previousTimeStamp");
|
|
2880
2880
|
o(this, "step", (e) => {
|
|
@@ -2899,13 +2899,13 @@ class oe {
|
|
|
2899
2899
|
this.staticNodes.has(i) || this.canvas.updateNode(i, { x: s.x, y: s.y });
|
|
2900
2900
|
});
|
|
2901
2901
|
});
|
|
2902
|
-
this.canvas = e, this.algorithm = t, this.staticNodes = s, this.win = i, new
|
|
2902
|
+
this.canvas = e, this.algorithm = t, this.staticNodes = s, this.win = i, new St(this.win, this.step);
|
|
2903
2903
|
}
|
|
2904
2904
|
static configure(e, t, s, i) {
|
|
2905
2905
|
new oe(e, t, s, i);
|
|
2906
2906
|
}
|
|
2907
2907
|
}
|
|
2908
|
-
const
|
|
2908
|
+
const Pt = () => {
|
|
2909
2909
|
const r = document.createElement("div");
|
|
2910
2910
|
return r.style.width = "100%", r.style.height = "100%", r.style.position = "relative", r;
|
|
2911
2911
|
}, H = () => {
|
|
@@ -2915,25 +2915,25 @@ const St = () => {
|
|
|
2915
2915
|
const r = H();
|
|
2916
2916
|
return r.style.pointerEvents = "none", r;
|
|
2917
2917
|
};
|
|
2918
|
-
class
|
|
2918
|
+
class bt {
|
|
2919
2919
|
constructor(e) {
|
|
2920
2920
|
o(this, "background", H());
|
|
2921
2921
|
o(this, "main", H());
|
|
2922
2922
|
o(this, "overlayConnectablePorts", pe());
|
|
2923
2923
|
o(this, "overlayDraggableEdges", pe());
|
|
2924
|
-
o(this, "host",
|
|
2924
|
+
o(this, "host", Pt());
|
|
2925
2925
|
this.element = e, this.element.appendChild(this.host), this.host.appendChild(this.background), this.host.appendChild(this.main), this.host.appendChild(this.overlayConnectablePorts), this.host.appendChild(this.overlayDraggableEdges);
|
|
2926
2926
|
}
|
|
2927
2927
|
destroy() {
|
|
2928
2928
|
this.host.removeChild(this.background), this.host.removeChild(this.main), this.host.removeChild(this.overlayConnectablePorts), this.host.removeChild(this.overlayDraggableEdges), this.element.removeChild(this.host);
|
|
2929
2929
|
}
|
|
2930
2930
|
}
|
|
2931
|
-
const j = (r) => () => r, we = j(0),
|
|
2931
|
+
const j = (r) => () => r, we = j(0), Tt = () => {
|
|
2932
2932
|
let r = 0;
|
|
2933
2933
|
return () => r++;
|
|
2934
|
-
},
|
|
2934
|
+
}, Dt = (r, e) => {
|
|
2935
2935
|
let t = we, s = we;
|
|
2936
|
-
const i =
|
|
2936
|
+
const i = Tt();
|
|
2937
2937
|
return r === "incremental" && (t = i), e === "incremental" && (s = i), typeof r == "number" && (t = j(r)), typeof e == "number" && (s = j(e)), typeof r == "function" && (t = r), typeof e == "function" && (s = e), {
|
|
2938
2938
|
nodesPriorityFn: t,
|
|
2939
2939
|
edgesPriorityFn: s
|
|
@@ -2943,7 +2943,7 @@ const j = (r) => () => r, we = j(0), bt = () => {
|
|
|
2943
2943
|
return r;
|
|
2944
2944
|
switch (r.type) {
|
|
2945
2945
|
case "straight":
|
|
2946
|
-
return () => new
|
|
2946
|
+
return () => new gt({
|
|
2947
2947
|
color: r.color,
|
|
2948
2948
|
width: r.width,
|
|
2949
2949
|
arrowLength: r.arrowLength,
|
|
@@ -2957,7 +2957,7 @@ const j = (r) => () => r, we = j(0), bt = () => {
|
|
|
2957
2957
|
detourDirection: r.detourDirection
|
|
2958
2958
|
});
|
|
2959
2959
|
case "horizontal":
|
|
2960
|
-
return () => new
|
|
2960
|
+
return () => new lt({
|
|
2961
2961
|
color: r.color,
|
|
2962
2962
|
width: r.width,
|
|
2963
2963
|
arrowLength: r.arrowLength,
|
|
@@ -2970,7 +2970,7 @@ const j = (r) => () => r, we = j(0), bt = () => {
|
|
|
2970
2970
|
detourDistance: r.detourDistance
|
|
2971
2971
|
});
|
|
2972
2972
|
case "vertical":
|
|
2973
|
-
return () => new
|
|
2973
|
+
return () => new ut({
|
|
2974
2974
|
color: r.color,
|
|
2975
2975
|
width: r.width,
|
|
2976
2976
|
arrowLength: r.arrowLength,
|
|
@@ -2983,7 +2983,7 @@ const j = (r) => () => r, we = j(0), bt = () => {
|
|
|
2983
2983
|
detourDistance: r.detourDistance
|
|
2984
2984
|
});
|
|
2985
2985
|
case "direct":
|
|
2986
|
-
return () => new
|
|
2986
|
+
return () => new Me({
|
|
2987
2987
|
color: r.color,
|
|
2988
2988
|
width: r.width,
|
|
2989
2989
|
arrowLength: r.arrowLength,
|
|
@@ -2994,7 +2994,7 @@ const j = (r) => () => r, we = j(0), bt = () => {
|
|
|
2994
2994
|
targetOffset: r.targetOffset
|
|
2995
2995
|
});
|
|
2996
2996
|
default:
|
|
2997
|
-
return () => new
|
|
2997
|
+
return () => new ct({
|
|
2998
2998
|
color: r.color,
|
|
2999
2999
|
width: r.width,
|
|
3000
3000
|
arrowLength: r.arrowLength,
|
|
@@ -3008,15 +3008,15 @@ const j = (r) => () => r, we = j(0), bt = () => {
|
|
|
3008
3008
|
detourDirection: r.detourDirection
|
|
3009
3009
|
});
|
|
3010
3010
|
}
|
|
3011
|
-
},
|
|
3011
|
+
}, Nt = (r) => {
|
|
3012
3012
|
var t, s, i, n, a;
|
|
3013
|
-
const e =
|
|
3013
|
+
const e = Dt(
|
|
3014
3014
|
(t = r.nodes) == null ? void 0 : t.priority,
|
|
3015
3015
|
(s = r.edges) == null ? void 0 : s.priority
|
|
3016
3016
|
);
|
|
3017
3017
|
return {
|
|
3018
3018
|
nodes: {
|
|
3019
|
-
centerFn: ((i = r.nodes) == null ? void 0 : i.centerFn) ??
|
|
3019
|
+
centerFn: ((i = r.nodes) == null ? void 0 : i.centerFn) ?? Se,
|
|
3020
3020
|
priorityFn: e.nodesPriorityFn
|
|
3021
3021
|
},
|
|
3022
3022
|
ports: {
|
|
@@ -3027,7 +3027,7 @@ const j = (r) => () => r, we = j(0), bt = () => {
|
|
|
3027
3027
|
priorityFn: e.edgesPriorityFn
|
|
3028
3028
|
}
|
|
3029
3029
|
};
|
|
3030
|
-
},
|
|
3030
|
+
}, Mt = (r) => {
|
|
3031
3031
|
var u, w, y, v, E;
|
|
3032
3032
|
const e = ((u = r.events) == null ? void 0 : u.onNodeDrag) ?? (() => {
|
|
3033
3033
|
}), t = r.nodeDragVerifier ?? (() => !0), s = ((w = r.events) == null ? void 0 : w.onNodeDragFinished) ?? (() => {
|
|
@@ -3043,7 +3043,7 @@ const j = (r) => () => r, we = j(0), bt = () => {
|
|
|
3043
3043
|
nodeDragVerifier: t,
|
|
3044
3044
|
onNodeDragFinished: s
|
|
3045
3045
|
};
|
|
3046
|
-
},
|
|
3046
|
+
}, Lt = (r) => {
|
|
3047
3047
|
const e = r.minX !== null ? r.minX : -1 / 0, t = r.maxX !== null ? r.maxX : 1 / 0, s = r.minY !== null ? r.minY : -1 / 0, i = r.maxY !== null ? r.maxY : 1 / 0;
|
|
3048
3048
|
return (n) => {
|
|
3049
3049
|
let a = n.nextTransform.x, h = n.nextTransform.y;
|
|
@@ -3053,7 +3053,7 @@ const j = (r) => () => r, we = j(0), bt = () => {
|
|
|
3053
3053
|
const g = n.canvasHeight * n.prevTransform.scale, l = i - g;
|
|
3054
3054
|
return h > l && h > n.prevTransform.y && (h = Math.max(n.prevTransform.y, l)), { scale: n.nextTransform.scale, x: a, y: h };
|
|
3055
3055
|
};
|
|
3056
|
-
},
|
|
3056
|
+
}, Rt = (r) => {
|
|
3057
3057
|
const e = r.maxContentScale, t = r.minContentScale, s = e !== null ? 1 / e : 0, i = t !== null ? 1 / t : 1 / 0;
|
|
3058
3058
|
return (n) => {
|
|
3059
3059
|
const a = n.prevTransform, h = n.nextTransform;
|
|
@@ -3074,7 +3074,7 @@ const j = (r) => () => r, we = j(0), bt = () => {
|
|
|
3074
3074
|
y: g
|
|
3075
3075
|
};
|
|
3076
3076
|
};
|
|
3077
|
-
},
|
|
3077
|
+
}, Ct = (r) => (e) => r.reduce(
|
|
3078
3078
|
(t, s) => s({
|
|
3079
3079
|
prevTransform: e.prevTransform,
|
|
3080
3080
|
nextTransform: t,
|
|
@@ -3087,12 +3087,12 @@ const j = (r) => () => r, we = j(0), bt = () => {
|
|
|
3087
3087
|
return r;
|
|
3088
3088
|
switch (r.type) {
|
|
3089
3089
|
case "scale-limit":
|
|
3090
|
-
return
|
|
3090
|
+
return Rt({
|
|
3091
3091
|
minContentScale: r.minContentScale ?? 0,
|
|
3092
3092
|
maxContentScale: r.maxContentScale ?? 1 / 0
|
|
3093
3093
|
});
|
|
3094
3094
|
case "shift-limit":
|
|
3095
|
-
return
|
|
3095
|
+
return Lt({
|
|
3096
3096
|
minX: r.minX ?? -1 / 0,
|
|
3097
3097
|
maxX: r.maxX ?? 1 / 0,
|
|
3098
3098
|
minY: r.minY ?? -1 / 0,
|
|
@@ -3103,7 +3103,7 @@ const j = (r) => () => r, we = j(0), bt = () => {
|
|
|
3103
3103
|
var y, v, E, A, R, T, N, $, ne, ae, he, de;
|
|
3104
3104
|
const e = (y = r == null ? void 0 : r.scale) == null ? void 0 : y.mouseWheelSensitivity, t = e !== void 0 ? e : 1.2, s = r == null ? void 0 : r.transformPreprocessor;
|
|
3105
3105
|
let i;
|
|
3106
|
-
s !== void 0 ? Array.isArray(s) ? i =
|
|
3106
|
+
s !== void 0 ? Array.isArray(s) ? i = Ct(
|
|
3107
3107
|
s.map(
|
|
3108
3108
|
(M) => fe(M)
|
|
3109
3109
|
)
|
|
@@ -3130,24 +3130,24 @@ const j = (r) => () => r, we = j(0), bt = () => {
|
|
|
3130
3130
|
onResizeTransformFinished: ((de = r == null ? void 0 : r.events) == null ? void 0 : de.onResizeTransformFinished) ?? (() => {
|
|
3131
3131
|
})
|
|
3132
3132
|
};
|
|
3133
|
-
},
|
|
3133
|
+
}, Vt = (r, e) => {
|
|
3134
3134
|
const t = document.createElementNS(
|
|
3135
3135
|
"http://www.w3.org/2000/svg",
|
|
3136
3136
|
"circle"
|
|
3137
3137
|
);
|
|
3138
3138
|
return t.setAttribute("cx", "0"), t.setAttribute("cy", "0"), t.setAttribute("r", `${r}`), t.setAttribute("fill", `${e}`), t;
|
|
3139
|
-
},
|
|
3139
|
+
}, $t = (r) => r instanceof SVGElement ? r : Vt(
|
|
3140
3140
|
(r == null ? void 0 : r.radius) ?? 1.5,
|
|
3141
3141
|
(r == null ? void 0 : r.color) ?? "#d8d8d8"
|
|
3142
|
-
),
|
|
3143
|
-
const e = r.tileDimensions, t = (e == null ? void 0 : e.width) ?? 25, s = (e == null ? void 0 : e.height) ?? 25, i =
|
|
3142
|
+
), It = (r) => {
|
|
3143
|
+
const e = r.tileDimensions, t = (e == null ? void 0 : e.width) ?? 25, s = (e == null ? void 0 : e.height) ?? 25, i = $t(r.renderer ?? {});
|
|
3144
3144
|
return {
|
|
3145
3145
|
tileWidth: t,
|
|
3146
3146
|
tileHeight: s,
|
|
3147
3147
|
renderer: i,
|
|
3148
3148
|
maxViewportScale: r.maxViewportScale ?? 10
|
|
3149
3149
|
};
|
|
3150
|
-
},
|
|
3150
|
+
}, Ut = (r, e, t) => {
|
|
3151
3151
|
var c, g, l;
|
|
3152
3152
|
const s = () => "direct", i = (u) => u, n = (u) => u.button === 0, a = () => {
|
|
3153
3153
|
}, h = () => {
|
|
@@ -3164,7 +3164,7 @@ const j = (r) => () => r, we = j(0), bt = () => {
|
|
|
3164
3164
|
dragPortDirection: r.dragPortDirection ?? t,
|
|
3165
3165
|
edgeShapeFactory: r.edgeShape !== void 0 ? ie(r.edgeShape) : e
|
|
3166
3166
|
};
|
|
3167
|
-
},
|
|
3167
|
+
}, Bt = (r, e) => {
|
|
3168
3168
|
var c, g, l;
|
|
3169
3169
|
const t = (u) => u, s = (u) => u.button === 0 && u.ctrlKey, i = (u) => u.button === 0, n = (u) => {
|
|
3170
3170
|
const w = e.getPortAdjacentEdgeIds(u);
|
|
@@ -3183,10 +3183,10 @@ const j = (r) => () => r, we = j(0), bt = () => {
|
|
|
3183
3183
|
onEdgeReattachInterrupted: ((g = r.events) == null ? void 0 : g.onEdgeReattachInterrupted) ?? d,
|
|
3184
3184
|
onEdgeReattachPrevented: ((l = r.events) == null ? void 0 : l.onEdgeReattachPrevented) ?? h
|
|
3185
3185
|
};
|
|
3186
|
-
},
|
|
3186
|
+
}, Ft = (r) => ({
|
|
3187
3187
|
nodeVerticalRadius: r.nodeContainingRadius.vertical,
|
|
3188
3188
|
nodeHorizontalRadius: r.nodeContainingRadius.horizontal
|
|
3189
|
-
}),
|
|
3189
|
+
}), Ot = (r) => {
|
|
3190
3190
|
var e, t;
|
|
3191
3191
|
return {
|
|
3192
3192
|
onAfterNodeDetached: ((e = r == null ? void 0 : r.events) == null ? void 0 : e.onAfterNodeDetached) ?? (() => {
|
|
@@ -3195,13 +3195,13 @@ const j = (r) => () => r, we = j(0), bt = () => {
|
|
|
3195
3195
|
})
|
|
3196
3196
|
};
|
|
3197
3197
|
};
|
|
3198
|
-
class
|
|
3198
|
+
class Wt extends Error {
|
|
3199
3199
|
constructor() {
|
|
3200
3200
|
super(...arguments);
|
|
3201
3201
|
o(this, "name", "CanvasBuilderError");
|
|
3202
3202
|
}
|
|
3203
3203
|
}
|
|
3204
|
-
class
|
|
3204
|
+
class kt {
|
|
3205
3205
|
constructor(e, t) {
|
|
3206
3206
|
this.coordinates = e, this.rand = t;
|
|
3207
3207
|
}
|
|
@@ -3215,7 +3215,7 @@ class Wt {
|
|
|
3215
3215
|
return { ex: c, ey: g, d2: h, d };
|
|
3216
3216
|
}
|
|
3217
3217
|
}
|
|
3218
|
-
class
|
|
3218
|
+
class $e {
|
|
3219
3219
|
constructor(e, t, s) {
|
|
3220
3220
|
o(this, "dtSec");
|
|
3221
3221
|
o(this, "k");
|
|
@@ -3231,7 +3231,7 @@ class Ve {
|
|
|
3231
3231
|
s.forEach((a) => {
|
|
3232
3232
|
t.set(a, { x: 0, y: 0 });
|
|
3233
3233
|
});
|
|
3234
|
-
const i = new
|
|
3234
|
+
const i = new kt(
|
|
3235
3235
|
this.currentCoords,
|
|
3236
3236
|
this.params.rand
|
|
3237
3237
|
), n = s.length;
|
|
@@ -3257,7 +3257,7 @@ class Ve {
|
|
|
3257
3257
|
}), e;
|
|
3258
3258
|
}
|
|
3259
3259
|
}
|
|
3260
|
-
const
|
|
3260
|
+
const Ie = (r, e, t) => {
|
|
3261
3261
|
const s = /* @__PURE__ */ new Map(), i = r.getAllNodeIds(), n = Math.sqrt(i.length) * t;
|
|
3262
3262
|
return i.forEach((a) => {
|
|
3263
3263
|
const h = r.getNode(a);
|
|
@@ -3267,17 +3267,17 @@ const $e = (r, e, t) => {
|
|
|
3267
3267
|
});
|
|
3268
3268
|
}), s;
|
|
3269
3269
|
};
|
|
3270
|
-
class
|
|
3270
|
+
class zt {
|
|
3271
3271
|
constructor(e) {
|
|
3272
3272
|
this.params = e;
|
|
3273
3273
|
}
|
|
3274
3274
|
calculateCoordinates(e) {
|
|
3275
|
-
const t =
|
|
3275
|
+
const t = Ie(
|
|
3276
3276
|
e,
|
|
3277
3277
|
this.params.rand,
|
|
3278
3278
|
this.params.edgeEquilibriumLength
|
|
3279
3279
|
);
|
|
3280
|
-
for (let s = 0; s < this.params.maxIterations && !(new
|
|
3280
|
+
for (let s = 0; s < this.params.maxIterations && !(new $e(e, t, {
|
|
3281
3281
|
rand: this.params.rand,
|
|
3282
3282
|
dtSec: this.params.dtSec,
|
|
3283
3283
|
nodeMass: this.params.nodeMass,
|
|
@@ -3290,17 +3290,17 @@ class kt {
|
|
|
3290
3290
|
return t;
|
|
3291
3291
|
}
|
|
3292
3292
|
}
|
|
3293
|
-
class
|
|
3293
|
+
class Xt {
|
|
3294
3294
|
constructor(e) {
|
|
3295
3295
|
this.params = e;
|
|
3296
3296
|
}
|
|
3297
3297
|
calculateNextCoordinates(e, t) {
|
|
3298
|
-
const s =
|
|
3298
|
+
const s = Ie(
|
|
3299
3299
|
e,
|
|
3300
3300
|
this.params.rand,
|
|
3301
3301
|
this.params.edgeEquilibriumLength
|
|
3302
3302
|
);
|
|
3303
|
-
return new
|
|
3303
|
+
return new $e(e, s, {
|
|
3304
3304
|
rand: this.params.rand,
|
|
3305
3305
|
dtSec: Math.min(t, this.params.maxTimeDeltaSec),
|
|
3306
3306
|
nodeMass: this.params.nodeMass,
|
|
@@ -3314,12 +3314,12 @@ class zt {
|
|
|
3314
3314
|
}) ? /* @__PURE__ */ new Map() : s;
|
|
3315
3315
|
}
|
|
3316
3316
|
}
|
|
3317
|
-
const
|
|
3317
|
+
const Ue = (r) => {
|
|
3318
3318
|
let e = 1779033703, t = 3144134277, s = 1013904242, i = 2773480762;
|
|
3319
3319
|
for (let n = 0, a; n < r.length; n++)
|
|
3320
3320
|
a = r.charCodeAt(n), e = t ^ Math.imul(e ^ a, 597399067), t = s ^ Math.imul(t ^ a, 2869860233), s = i ^ Math.imul(s ^ a, 951274213), i = e ^ Math.imul(i ^ a, 2716044179);
|
|
3321
3321
|
return e = Math.imul(s ^ e >>> 18, 597399067), t = Math.imul(i ^ t >>> 22, 2869860233), s = Math.imul(e ^ s >>> 17, 951274213), i = Math.imul(t ^ i >>> 19, 2716044179), e ^= t ^ s ^ i, t ^= e, s ^= e, i ^= e, [e >>> 0, t >>> 0, s >>> 0, i >>> 0];
|
|
3322
|
-
},
|
|
3322
|
+
}, Be = (r, e, t, s) => function() {
|
|
3323
3323
|
r |= 0, e |= 0, t |= 0, s |= 0;
|
|
3324
3324
|
const i = (r + e | 0) + s | 0;
|
|
3325
3325
|
return s = s + 1 | 0, r = e ^ e >>> 9, e = t + (t << 3) | 0, t = t << 21 | t >>> 11, t = t + i | 0, (i >>> 0) / 4294967296;
|
|
@@ -3334,14 +3334,14 @@ const Ie = (r) => {
|
|
|
3334
3334
|
dtSec: 0.02,
|
|
3335
3335
|
maxIterations: 100,
|
|
3336
3336
|
convergenceDelta: 1e-3
|
|
3337
|
-
}),
|
|
3337
|
+
}), Yt = (r) => {
|
|
3338
3338
|
var e;
|
|
3339
3339
|
switch ((e = r == null ? void 0 : r.algorithm) == null ? void 0 : e.type) {
|
|
3340
3340
|
case "custom":
|
|
3341
3341
|
return r.algorithm.instance;
|
|
3342
3342
|
default: {
|
|
3343
|
-
const t = r == null ? void 0 : r.algorithm, s =
|
|
3344
|
-
return new
|
|
3343
|
+
const t = r == null ? void 0 : r.algorithm, s = Ue((t == null ? void 0 : t.seed) ?? S.seed), i = Be(s[0], s[1], s[2], s[3]);
|
|
3344
|
+
return new Xt({
|
|
3345
3345
|
rand: i,
|
|
3346
3346
|
maxTimeDeltaSec: (t == null ? void 0 : t.maxTimeDeltaSec) ?? S.maxTimeDeltaSec,
|
|
3347
3347
|
nodeCharge: (t == null ? void 0 : t.nodeCharge) ?? S.nodeCharge,
|
|
@@ -3353,18 +3353,18 @@ const Ie = (r) => {
|
|
|
3353
3353
|
});
|
|
3354
3354
|
}
|
|
3355
3355
|
}
|
|
3356
|
-
},
|
|
3356
|
+
}, Ht = (r) => r instanceof G ? {
|
|
3357
3357
|
type: "manual",
|
|
3358
3358
|
trigger: r
|
|
3359
3359
|
} : {
|
|
3360
3360
|
type: "topologyChangeTimeout"
|
|
3361
|
-
},
|
|
3361
|
+
}, jt = (r) => {
|
|
3362
3362
|
switch (r == null ? void 0 : r.type) {
|
|
3363
3363
|
case "custom":
|
|
3364
3364
|
return r.instance;
|
|
3365
3365
|
default: {
|
|
3366
|
-
const e =
|
|
3367
|
-
return new
|
|
3366
|
+
const e = Ue((r == null ? void 0 : r.seed) ?? S.seed), t = Be(e[0], e[1], e[2], e[3]);
|
|
3367
|
+
return new zt({
|
|
3368
3368
|
dtSec: (r == null ? void 0 : r.dtSec) ?? S.dtSec,
|
|
3369
3369
|
maxIterations: (r == null ? void 0 : r.maxIterations) ?? S.maxIterations,
|
|
3370
3370
|
rand: t,
|
|
@@ -3377,23 +3377,23 @@ const Ie = (r) => {
|
|
|
3377
3377
|
});
|
|
3378
3378
|
}
|
|
3379
3379
|
}
|
|
3380
|
-
},
|
|
3381
|
-
algorithm:
|
|
3382
|
-
applyOn:
|
|
3383
|
-
}),
|
|
3380
|
+
}, Gt = (r) => ({
|
|
3381
|
+
algorithm: jt(r == null ? void 0 : r.algorithm),
|
|
3382
|
+
applyOn: Ht(r == null ? void 0 : r.applyOn)
|
|
3383
|
+
}), Kt = (r, e) => ({
|
|
3384
3384
|
...r,
|
|
3385
3385
|
nodeDragVerifier: (t) => (e.add(t), r.nodeDragVerifier(t)),
|
|
3386
3386
|
onNodeDragFinished: (t) => {
|
|
3387
3387
|
e.delete(t), r.onNodeDragFinished(t);
|
|
3388
3388
|
}
|
|
3389
|
-
}),
|
|
3389
|
+
}), Zt = (r, e) => {
|
|
3390
3390
|
r.onBeforeNodeRemoved.subscribe((t) => {
|
|
3391
3391
|
e.delete(t);
|
|
3392
3392
|
}), r.onBeforeClear.subscribe(() => {
|
|
3393
3393
|
e.clear();
|
|
3394
3394
|
});
|
|
3395
3395
|
};
|
|
3396
|
-
class
|
|
3396
|
+
class qt {
|
|
3397
3397
|
constructor(e) {
|
|
3398
3398
|
o(this, "used", !1);
|
|
3399
3399
|
o(this, "canvasDefaults", {});
|
|
@@ -3415,9 +3415,9 @@ class Qt {
|
|
|
3415
3415
|
o(this, "hasLayout", !1);
|
|
3416
3416
|
o(this, "boxRenderingTrigger", new G());
|
|
3417
3417
|
o(this, "graphStore", new Ee());
|
|
3418
|
-
o(this, "viewportStore", new
|
|
3419
|
-
o(this, "graph", new
|
|
3420
|
-
o(this, "viewport", new
|
|
3418
|
+
o(this, "viewportStore", new Ge());
|
|
3419
|
+
o(this, "graph", new Re(this.graphStore));
|
|
3420
|
+
o(this, "viewport", new Ce(this.viewportStore));
|
|
3421
3421
|
o(this, "window", window);
|
|
3422
3422
|
o(this, "animationStaticNodes", /* @__PURE__ */ new Set());
|
|
3423
3423
|
this.element = e;
|
|
@@ -3488,21 +3488,21 @@ class Qt {
|
|
|
3488
3488
|
*/
|
|
3489
3489
|
build() {
|
|
3490
3490
|
if (this.used)
|
|
3491
|
-
throw new
|
|
3491
|
+
throw new Wt("CanvasBuilder is a single use object");
|
|
3492
3492
|
this.used = !0;
|
|
3493
|
-
const e = new
|
|
3493
|
+
const e = new bt(this.element);
|
|
3494
3494
|
let t = new me(
|
|
3495
3495
|
this.graphStore,
|
|
3496
3496
|
this.viewportStore,
|
|
3497
3497
|
e.main
|
|
3498
3498
|
);
|
|
3499
|
-
this.virtualScrollConfig !== void 0 && (t = new
|
|
3499
|
+
this.virtualScrollConfig !== void 0 && (t = new Ye(
|
|
3500
3500
|
t,
|
|
3501
3501
|
this.graphStore,
|
|
3502
3502
|
this.boxRenderingTrigger,
|
|
3503
|
-
|
|
3504
|
-
)), t = new
|
|
3505
|
-
const s =
|
|
3503
|
+
Ot(this.virtualScrollConfig)
|
|
3504
|
+
)), t = new He(t, this.graphStore);
|
|
3505
|
+
const s = Nt(this.canvasDefaults), i = new ve(
|
|
3506
3506
|
this.graph,
|
|
3507
3507
|
this.viewport,
|
|
3508
3508
|
this.graphStore,
|
|
@@ -3512,11 +3512,11 @@ class Qt {
|
|
|
3512
3512
|
);
|
|
3513
3513
|
if (this.hasBackground && _.configure(
|
|
3514
3514
|
i,
|
|
3515
|
-
|
|
3515
|
+
It(this.backgroundConfig),
|
|
3516
3516
|
e.background
|
|
3517
3517
|
), this.hasNodeResizeReactiveEdges && K.configure(i), this.hasDraggableNodes) {
|
|
3518
|
-
let a =
|
|
3519
|
-
this.hasAnimatedLayout && (a =
|
|
3518
|
+
let a = Mt(this.dragConfig);
|
|
3519
|
+
this.hasAnimatedLayout && (a = Kt(
|
|
3520
3520
|
a,
|
|
3521
3521
|
this.animationStaticNodes
|
|
3522
3522
|
)), Q.configure(
|
|
@@ -3527,7 +3527,7 @@ class Qt {
|
|
|
3527
3527
|
);
|
|
3528
3528
|
}
|
|
3529
3529
|
if (this.hasUserConnectablePorts) {
|
|
3530
|
-
const a =
|
|
3530
|
+
const a = Ut(
|
|
3531
3531
|
this.connectablePortsConfig,
|
|
3532
3532
|
s.edges.shapeFactory,
|
|
3533
3533
|
s.ports.direction
|
|
@@ -3541,7 +3541,7 @@ class Qt {
|
|
|
3541
3541
|
);
|
|
3542
3542
|
}
|
|
3543
3543
|
if (this.hasUserDraggableEdges) {
|
|
3544
|
-
const a =
|
|
3544
|
+
const a = Bt(
|
|
3545
3545
|
this.draggableEdgesConfig,
|
|
3546
3546
|
i.graph
|
|
3547
3547
|
);
|
|
@@ -3559,21 +3559,21 @@ class Qt {
|
|
|
3559
3559
|
this.window,
|
|
3560
3560
|
ye(this.transformConfig),
|
|
3561
3561
|
this.boxRenderingTrigger,
|
|
3562
|
-
|
|
3562
|
+
Ft(this.virtualScrollConfig)
|
|
3563
3563
|
) : this.hasTransformableViewport && X.configure(
|
|
3564
3564
|
i,
|
|
3565
3565
|
e.main,
|
|
3566
3566
|
this.window,
|
|
3567
3567
|
ye(this.transformConfig)
|
|
3568
|
-
), this.hasLayout &&
|
|
3568
|
+
), this.hasLayout && xt.configure(
|
|
3569
3569
|
i,
|
|
3570
|
-
|
|
3571
|
-
), this.hasAnimatedLayout && (
|
|
3570
|
+
Gt(this.layoutConfig)
|
|
3571
|
+
), this.hasAnimatedLayout && (Zt(
|
|
3572
3572
|
i.graph,
|
|
3573
3573
|
this.animationStaticNodes
|
|
3574
3574
|
), oe.configure(
|
|
3575
3575
|
i,
|
|
3576
|
-
|
|
3576
|
+
Yt(this.animatedLayoutConfig),
|
|
3577
3577
|
this.animationStaticNodes,
|
|
3578
3578
|
this.window
|
|
3579
3579
|
));
|
|
@@ -3584,16 +3584,16 @@ class Qt {
|
|
|
3584
3584
|
}
|
|
3585
3585
|
}
|
|
3586
3586
|
export {
|
|
3587
|
-
|
|
3588
|
-
|
|
3589
|
-
|
|
3587
|
+
ct as BezierEdgeShape,
|
|
3588
|
+
qt as CanvasBuilder,
|
|
3589
|
+
Wt as CanvasBuilderError,
|
|
3590
3590
|
P as CanvasError,
|
|
3591
|
-
|
|
3591
|
+
Me as DirectEdgeShape,
|
|
3592
3592
|
G as EventSubject,
|
|
3593
|
-
|
|
3594
|
-
|
|
3595
|
-
|
|
3596
|
-
|
|
3597
|
-
|
|
3598
|
-
|
|
3593
|
+
lt as HorizontalEdgeShape,
|
|
3594
|
+
ft as InteractiveEdgeError,
|
|
3595
|
+
Le as InteractiveEdgeShape,
|
|
3596
|
+
Qt as MidpointEdgeShape,
|
|
3597
|
+
gt as StraightEdgeShape,
|
|
3598
|
+
ut as VerticalEdgeShape
|
|
3599
3599
|
};
|