mx-framework-plus 1.1.3 → 1.1.5
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/mx-framework-plus.es.ts +349 -343
- package/dist/mx-framework-plus.umd.ts +8 -8
- package/package.json +1 -1
|
@@ -29,15 +29,15 @@ function ue(t, e, l) {
|
|
|
29
29
|
if (De.randomUUID && !t)
|
|
30
30
|
return De.randomUUID();
|
|
31
31
|
t = t || {};
|
|
32
|
-
const
|
|
33
|
-
if (
|
|
32
|
+
const o = t.random ?? ((r = t.rng) == null ? void 0 : r.call(t)) ?? pt();
|
|
33
|
+
if (o.length < 16)
|
|
34
34
|
throw new Error("Random bytes length must be >= 16");
|
|
35
|
-
return
|
|
35
|
+
return o[6] = o[6] & 15 | 64, o[8] = o[8] & 63 | 128, yt(o);
|
|
36
36
|
}
|
|
37
37
|
const gt = (t, e, l) => {
|
|
38
|
-
let
|
|
38
|
+
let o = ["edit"];
|
|
39
39
|
return t && t.forEach((r) => {
|
|
40
|
-
e.includes(r.code) ? r.disable = !1 :
|
|
40
|
+
e.includes(r.code) ? r.disable = !1 : o.includes(r.code) || (r.disable = !0);
|
|
41
41
|
}), t;
|
|
42
42
|
}, Re = {
|
|
43
43
|
BoundLabels: "icon-binding-label",
|
|
@@ -3915,19 +3915,19 @@ let We = {
|
|
|
3915
3915
|
]
|
|
3916
3916
|
};
|
|
3917
3917
|
const vt = (t, e, l = {}) => {
|
|
3918
|
-
let
|
|
3918
|
+
let o = {};
|
|
3919
3919
|
t == "kitUI:BoundLabelWidget" ? t = "BoundLabels" : t == "kitUI:CanvasWidget" && (t = "Canvas");
|
|
3920
3920
|
let r = We[de[t]];
|
|
3921
3921
|
return r ? (l && Object.keys(l).length > 0 && r.forEach((m) => {
|
|
3922
3922
|
let p = l[m.key];
|
|
3923
3923
|
p && (m = Object.assign(m, p));
|
|
3924
|
-
}),
|
|
3924
|
+
}), o = {
|
|
3925
3925
|
title: de[t],
|
|
3926
3926
|
value: e,
|
|
3927
3927
|
icon: Re[t],
|
|
3928
3928
|
children: r
|
|
3929
|
-
}, JSON.parse(JSON.stringify(
|
|
3930
|
-
}, _e = (t, e, l = {},
|
|
3929
|
+
}, JSON.parse(JSON.stringify(o))) : {};
|
|
3930
|
+
}, _e = (t, e, l = {}, o) => {
|
|
3931
3931
|
let r = {}, m = We[de[t]];
|
|
3932
3932
|
if (m && m.length > 0) {
|
|
3933
3933
|
let p = null, v = m.find((A) => A.key == "treeData"), x = m.find((A) => A.key == "compType"), g = [], h = [];
|
|
@@ -4004,7 +4004,7 @@ const vt = (t, e, l = {}) => {
|
|
|
4004
4004
|
return {};
|
|
4005
4005
|
};
|
|
4006
4006
|
function bt(t, e, l) {
|
|
4007
|
-
return new Promise((
|
|
4007
|
+
return new Promise((o, r) => {
|
|
4008
4008
|
let m = t.getDefaultParent(), p = t.getModel();
|
|
4009
4009
|
p.beginUpdate();
|
|
4010
4010
|
try {
|
|
@@ -4032,13 +4032,13 @@ function bt(t, e, l) {
|
|
|
4032
4032
|
A.y + N
|
|
4033
4033
|
),
|
|
4034
4034
|
!1
|
|
4035
|
-
), v.setGeometry(g), v.value = e.value, v.type = e.type, v.model = "yes", v.type = "edge", v.iconName = e.iconName,
|
|
4035
|
+
), v.setGeometry(g), v.value = e.value, v.type = e.type, v.model = "yes", v.type = "edge", v.iconName = e.iconName, o(v);
|
|
4036
4036
|
} finally {
|
|
4037
4037
|
p.endUpdate();
|
|
4038
4038
|
}
|
|
4039
4039
|
});
|
|
4040
4040
|
}
|
|
4041
|
-
async function Ct(t, e, l,
|
|
4041
|
+
async function Ct(t, e, l, o) {
|
|
4042
4042
|
if (e && e.length > 0) {
|
|
4043
4043
|
let N = e[0];
|
|
4044
4044
|
var r = t.getCellGeometry(N), m = r.x, p = r.y, v = l.x, x = l.y, g = v - m, h = x - p;
|
|
@@ -4061,7 +4061,7 @@ async function Ct(t, e, l, s) {
|
|
|
4061
4061
|
}
|
|
4062
4062
|
}
|
|
4063
4063
|
setTimeout(() => {
|
|
4064
|
-
t.setSelectionCells(z),
|
|
4064
|
+
t.setSelectionCells(z), o.handelEvent({ key: "paste", val: z });
|
|
4065
4065
|
}, 10);
|
|
4066
4066
|
} finally {
|
|
4067
4067
|
t.getModel().endUpdate();
|
|
@@ -4069,7 +4069,7 @@ async function Ct(t, e, l, s) {
|
|
|
4069
4069
|
}
|
|
4070
4070
|
}
|
|
4071
4071
|
function wt(t, e) {
|
|
4072
|
-
return new Promise((l,
|
|
4072
|
+
return new Promise((l, o) => {
|
|
4073
4073
|
let r = t.getDefaultParent(), m = t.getModel();
|
|
4074
4074
|
m.beginUpdate();
|
|
4075
4075
|
try {
|
|
@@ -4105,63 +4105,63 @@ function wt(t, e) {
|
|
|
4105
4105
|
}
|
|
4106
4106
|
async function kt(t, e, l) {
|
|
4107
4107
|
mxClipboard.copy(t, []), t.getDefaultParent();
|
|
4108
|
-
let
|
|
4108
|
+
let o = [], r = [];
|
|
4109
4109
|
if (e && e.length > 0) {
|
|
4110
4110
|
for (let m = 0; m < e.length; m++) {
|
|
4111
4111
|
const p = e[m];
|
|
4112
|
-
p.type === "edge" ? r.push(p) :
|
|
4112
|
+
p.type === "edge" ? r.push(p) : o.push(p);
|
|
4113
4113
|
}
|
|
4114
4114
|
if (r.length > 0)
|
|
4115
4115
|
for (let m = 0; m < r.length; m++) {
|
|
4116
4116
|
const p = r[m];
|
|
4117
4117
|
let v = await wt(t, p);
|
|
4118
|
-
|
|
4118
|
+
o.push(v);
|
|
4119
4119
|
}
|
|
4120
|
-
return t.addSelectionCells(
|
|
4120
|
+
return t.addSelectionCells(o), o;
|
|
4121
4121
|
}
|
|
4122
4122
|
}
|
|
4123
4123
|
function xt(t) {
|
|
4124
4124
|
let e = t.getModel().cells, l = [];
|
|
4125
|
-
for (const
|
|
4126
|
-
let r = e[
|
|
4127
|
-
r.type != "kitUI:CanvasWidget" && r.id != "0" && r.id != "1" && l.push(e[
|
|
4125
|
+
for (const o in e) {
|
|
4126
|
+
let r = e[o];
|
|
4127
|
+
r.type != "kitUI:CanvasWidget" && r.id != "0" && r.id != "1" && l.push(e[o]);
|
|
4128
4128
|
}
|
|
4129
4129
|
return l;
|
|
4130
4130
|
}
|
|
4131
4131
|
function St(t) {
|
|
4132
4132
|
t.addAction("toUp", function(e) {
|
|
4133
|
-
let l = t.graph,
|
|
4134
|
-
|
|
4133
|
+
let l = t.graph, o = xt(l);
|
|
4134
|
+
o && o.length > 0 && l.orderCells(!1, o);
|
|
4135
4135
|
}), t.addAction("toDown", function(e) {
|
|
4136
|
-
let l = t.graph,
|
|
4136
|
+
let l = t.graph, o = l.getModel(), r = l.getDefaultParent();
|
|
4137
4137
|
var m = new Array();
|
|
4138
4138
|
m = l.getSelectionCells();
|
|
4139
4139
|
for (let p = 0; p < m.length; p++) {
|
|
4140
4140
|
const v = m[p];
|
|
4141
|
-
|
|
4141
|
+
o.add(r, v, 1);
|
|
4142
4142
|
}
|
|
4143
4143
|
}), t.addAction("upOne", function(e) {
|
|
4144
|
-
let l = t.graph,
|
|
4144
|
+
let l = t.graph, o = l.getModel(), r = l.getDefaultParent();
|
|
4145
4145
|
var m = l.getSelectionCells();
|
|
4146
4146
|
let v = [...r.children];
|
|
4147
4147
|
if (m && m.length > 0)
|
|
4148
4148
|
for (let x = 0; x < m.length; x++) {
|
|
4149
4149
|
const g = m[x];
|
|
4150
4150
|
let k = v.findIndex((N) => N.id == g.id) + x + 1;
|
|
4151
|
-
v[k] && (k = k + 1),
|
|
4151
|
+
v[k] && (k = k + 1), o.add(r, g, k);
|
|
4152
4152
|
}
|
|
4153
4153
|
}), t.addAction("downOne", function(e) {
|
|
4154
|
-
let l = t.graph,
|
|
4154
|
+
let l = t.graph, o = l.getModel(), r = l.getDefaultParent();
|
|
4155
4155
|
var m = l.getSelectionCells();
|
|
4156
4156
|
let p = r.children;
|
|
4157
4157
|
if (m && m.length > 0)
|
|
4158
4158
|
for (let v = 0; v < m.length; v++) {
|
|
4159
4159
|
const x = m[v], g = p.findIndex((k) => k.id == x.id), h = g - 1 < 1 ? 1 : g - 1;
|
|
4160
|
-
|
|
4160
|
+
o.add(r, x, h);
|
|
4161
4161
|
}
|
|
4162
4162
|
});
|
|
4163
4163
|
}
|
|
4164
|
-
async function Be(t, e, l,
|
|
4164
|
+
async function Be(t, e, l, o) {
|
|
4165
4165
|
let { pt: r, style: m, me: p, type: v, iconCls: x } = l, g = p.editor;
|
|
4166
4166
|
switch (t) {
|
|
4167
4167
|
case "add":
|
|
@@ -4202,24 +4202,24 @@ async function Be(t, e, l, s) {
|
|
|
4202
4202
|
});
|
|
4203
4203
|
break;
|
|
4204
4204
|
case "del":
|
|
4205
|
-
e.isEnabled() && (e.removeCells(),
|
|
4205
|
+
e.isEnabled() && (e.removeCells(), o.handelEvent({ key: "delete" }));
|
|
4206
4206
|
break;
|
|
4207
4207
|
case "edit":
|
|
4208
4208
|
let z = null;
|
|
4209
4209
|
var h = new Array();
|
|
4210
|
-
h = e.getSelectionCells(), h && h.length > 0 ? z = h[0] : z = p.parent,
|
|
4210
|
+
h = e.getSelectionCells(), h && h.length > 0 ? z = h[0] : z = p.parent, o.handelEvent({ key: "edit", val: z });
|
|
4211
4211
|
break;
|
|
4212
4212
|
case "clone":
|
|
4213
4213
|
var h = new Array();
|
|
4214
|
-
h = e.getSelectionCells(), mxClipboard.copy(e, h), mxClipboard.paste(e), await kt(e, mxClipboard.cells),
|
|
4214
|
+
h = e.getSelectionCells(), mxClipboard.copy(e, h), mxClipboard.paste(e), await kt(e, mxClipboard.cells), o.handelEvent({ key: "clone", val: h });
|
|
4215
4215
|
break;
|
|
4216
4216
|
case "copy":
|
|
4217
4217
|
var h = new Array();
|
|
4218
|
-
h = e.getSelectionCells(), mxClipboard.copy(e, h),
|
|
4218
|
+
h = e.getSelectionCells(), mxClipboard.copy(e, h), o.handelEvent({ key: "copy", val: h });
|
|
4219
4219
|
break;
|
|
4220
4220
|
case "paste":
|
|
4221
4221
|
const C = mxClipboard.cells;
|
|
4222
|
-
Ct(e, C, r,
|
|
4222
|
+
Ct(e, C, r, o);
|
|
4223
4223
|
break;
|
|
4224
4224
|
case "cut":
|
|
4225
4225
|
mxClipboard.cut(e, h);
|
|
@@ -4237,16 +4237,16 @@ async function Be(t, e, l, s) {
|
|
|
4237
4237
|
g.execute("alignCellsMiddle");
|
|
4238
4238
|
break;
|
|
4239
4239
|
case "toUp":
|
|
4240
|
-
g.execute("toFront"),
|
|
4240
|
+
g.execute("toFront"), o.handelEvent({ key: "toLayer", val: h });
|
|
4241
4241
|
break;
|
|
4242
4242
|
case "toDown":
|
|
4243
|
-
g.execute("toDown"),
|
|
4243
|
+
g.execute("toDown"), o.handelEvent({ key: "toLayer", val: h });
|
|
4244
4244
|
break;
|
|
4245
4245
|
case "upOne":
|
|
4246
|
-
g.execute("upOne"),
|
|
4246
|
+
g.execute("upOne"), o.handelEvent({ key: "toLayer", val: h });
|
|
4247
4247
|
break;
|
|
4248
4248
|
case "downOne":
|
|
4249
|
-
g.execute("downOne"),
|
|
4249
|
+
g.execute("downOne"), o.handelEvent({ key: "toLayer", val: h });
|
|
4250
4250
|
break;
|
|
4251
4251
|
case "alignCellsTop":
|
|
4252
4252
|
g.execute("alignCellsTop");
|
|
@@ -4258,14 +4258,14 @@ async function Be(t, e, l, s) {
|
|
|
4258
4258
|
}
|
|
4259
4259
|
function Et(t, e, l) {
|
|
4260
4260
|
if (!e) return;
|
|
4261
|
-
const
|
|
4262
|
-
let r =
|
|
4263
|
-
e.type == "kitUI:CanvasWidget" && (r = e.style),
|
|
4261
|
+
const o = t.getModel();
|
|
4262
|
+
let r = o.getStyle(e);
|
|
4263
|
+
e.type == "kitUI:CanvasWidget" && (r = e.style), o.beginUpdate();
|
|
4264
4264
|
try {
|
|
4265
4265
|
if (r === l) return;
|
|
4266
|
-
|
|
4266
|
+
o.setStyle(e, l);
|
|
4267
4267
|
} finally {
|
|
4268
|
-
|
|
4268
|
+
o.endUpdate();
|
|
4269
4269
|
}
|
|
4270
4270
|
const m = {
|
|
4271
4271
|
cell: e,
|
|
@@ -4273,7 +4273,7 @@ function Et(t, e, l) {
|
|
|
4273
4273
|
newStyle: l,
|
|
4274
4274
|
// 撤销操作:恢复旧样式
|
|
4275
4275
|
undo: function() {
|
|
4276
|
-
|
|
4276
|
+
o.beginUpdate();
|
|
4277
4277
|
try {
|
|
4278
4278
|
let v = Fe(this.cell, this.oldStyle), x = t.container.querySelector("canvas");
|
|
4279
4279
|
if (x && this.cell.type == "kitUI:CanvasWidget") {
|
|
@@ -4281,19 +4281,19 @@ function Et(t, e, l) {
|
|
|
4281
4281
|
let h = v.viewSize.split(",");
|
|
4282
4282
|
if (h && h.length > 0) {
|
|
4283
4283
|
let k = this.cell.geometry;
|
|
4284
|
-
k != null && (k = k.clone(), k.width = h[0], k.height = h[1],
|
|
4284
|
+
k != null && (k = k.clone(), k.width = h[0], k.height = h[1], o.setGeometry(this.cell, k));
|
|
4285
4285
|
}
|
|
4286
4286
|
}
|
|
4287
4287
|
v["background-image"] ? x.style.background = `${v["background-image"]}center center no-repeat` : x.style.background = "transparent";
|
|
4288
4288
|
}
|
|
4289
|
-
v && Object.keys(v).length > 0 && (this.cell.value.style = v, this.cell.value.data = Oe(v, this.cell.value.data),
|
|
4289
|
+
v && Object.keys(v).length > 0 && (this.cell.value.style = v, this.cell.value.data = Oe(v, this.cell.value.data), o.setStyle(this.cell, this.oldStyle), t.refresh(this.cell));
|
|
4290
4290
|
} finally {
|
|
4291
|
-
|
|
4291
|
+
o.endUpdate();
|
|
4292
4292
|
}
|
|
4293
4293
|
},
|
|
4294
4294
|
// 重做操作:应用新样式
|
|
4295
4295
|
redo: function() {
|
|
4296
|
-
|
|
4296
|
+
o.beginUpdate();
|
|
4297
4297
|
try {
|
|
4298
4298
|
let v = Fe(this.cell, this.newStyle), x = t.container.querySelector("canvas");
|
|
4299
4299
|
if (x && this.cell.type == "kitUI:CanvasWidget") {
|
|
@@ -4301,44 +4301,44 @@ function Et(t, e, l) {
|
|
|
4301
4301
|
let h = v.viewSize.split(",");
|
|
4302
4302
|
if (h && h.length > 0) {
|
|
4303
4303
|
let k = this.cell.geometry;
|
|
4304
|
-
k != null && (k = k.clone(), k.width = h[0], k.height = h[1],
|
|
4304
|
+
k != null && (k = k.clone(), k.width = h[0], k.height = h[1], o.setGeometry(this.cell, k));
|
|
4305
4305
|
}
|
|
4306
4306
|
}
|
|
4307
4307
|
v["background-image"] ? x.style.background = `${v["background-image"]}center center no-repeat` : x.style.background = "transparent";
|
|
4308
4308
|
}
|
|
4309
4309
|
this.cell.value.style = v, this.cell.value.data = Oe(v, this.cell.value.data), t.refresh(this.cell);
|
|
4310
4310
|
} finally {
|
|
4311
|
-
|
|
4311
|
+
o.endUpdate();
|
|
4312
4312
|
}
|
|
4313
4313
|
}
|
|
4314
|
-
}, p = new mxUndoableEdit(
|
|
4315
|
-
p.add(m),
|
|
4314
|
+
}, p = new mxUndoableEdit(o);
|
|
4315
|
+
p.add(m), o.fireEvent(new mxEventObject(mxEvent.UNDO, "edit", p)), o.fireEvent(new mxEventObject(mxEvent.REDO, "edit", p));
|
|
4316
4316
|
}
|
|
4317
4317
|
function At(t) {
|
|
4318
4318
|
return t !== null && typeof t == "object";
|
|
4319
4319
|
}
|
|
4320
4320
|
function zt(t) {
|
|
4321
|
-
return t.slice(0, 1) === "-" && (t = t.slice(1)), t.replace(/([^-])(?:-+([^-]))/g, function(e, l,
|
|
4322
|
-
return l +
|
|
4321
|
+
return t.slice(0, 1) === "-" && (t = t.slice(1)), t.replace(/([^-])(?:-+([^-]))/g, function(e, l, o) {
|
|
4322
|
+
return l + o.toUpperCase();
|
|
4323
4323
|
});
|
|
4324
4324
|
}
|
|
4325
4325
|
function Fe(t, e) {
|
|
4326
4326
|
if (At(e)) return e;
|
|
4327
|
-
const l = e.trim().split(";"),
|
|
4327
|
+
const l = e.trim().split(";"), o = {};
|
|
4328
4328
|
l.forEach((x) => {
|
|
4329
4329
|
if (!x.trim()) return;
|
|
4330
4330
|
const g = x.indexOf("=");
|
|
4331
4331
|
if (g === -1) return;
|
|
4332
4332
|
const h = x.substring(0, g).trim(), k = x.substring(g + 1).trim(), N = zt(h);
|
|
4333
4333
|
let A = k;
|
|
4334
|
-
N === "gap" && (A = k.replace("px", "")),
|
|
4334
|
+
N === "gap" && (A = k.replace("px", "")), o[N] = A;
|
|
4335
4335
|
});
|
|
4336
4336
|
let { style: r, compType: m, data: p } = _e(t.realType, "0", null);
|
|
4337
|
-
return { ...r, ...
|
|
4337
|
+
return { ...r, ...o };
|
|
4338
4338
|
}
|
|
4339
4339
|
function Oe(t, e) {
|
|
4340
|
-
return e ? ((e.children || []).forEach((
|
|
4341
|
-
|
|
4340
|
+
return e ? ((e.children || []).forEach((o) => {
|
|
4341
|
+
o.value = t[o.key] || null;
|
|
4342
4342
|
}), e) : [];
|
|
4343
4343
|
}
|
|
4344
4344
|
function Me(t) {
|
|
@@ -4359,7 +4359,7 @@ function Me(t) {
|
|
|
4359
4359
|
A.endUpdate();
|
|
4360
4360
|
}
|
|
4361
4361
|
}
|
|
4362
|
-
function
|
|
4362
|
+
function o(g) {
|
|
4363
4363
|
let h = g.indexOfNextAdd;
|
|
4364
4364
|
return !!(g.history && g.history.length == 1 && h == 1);
|
|
4365
4365
|
}
|
|
@@ -4373,9 +4373,9 @@ function Me(t) {
|
|
|
4373
4373
|
if (!e.ts.pageShortcuts) {
|
|
4374
4374
|
if (A) {
|
|
4375
4375
|
if (g.key === "z" || g.key === "Z")
|
|
4376
|
-
|
|
4376
|
+
o(h), h.canUndo() && (h.undo(), e.ts.handelEvent({ key: "unre" }), k && k("undo"));
|
|
4377
4377
|
else if (g.key === "y" || g.key === "Y")
|
|
4378
|
-
|
|
4378
|
+
o(h), h.canRedo() && (h.redo(), e.ts.handelEvent({ key: "unre" }), k && k("redo"));
|
|
4379
4379
|
else if (g.key === "a" || g.key === "A")
|
|
4380
4380
|
N.selectCells(!0, !1), e.ts.handelEvent({ key: "selectAll" });
|
|
4381
4381
|
else if (g.key === "c" || g.key === "C") {
|
|
@@ -4448,20 +4448,20 @@ function Me(t) {
|
|
|
4448
4448
|
// 继承样式
|
|
4449
4449
|
), U = 10, I = 10, R = g.getCellGeometry(h);
|
|
4450
4450
|
let $ = R.getTerminalPoint(!0), T = R.getTerminalPoint(!1);
|
|
4451
|
-
var
|
|
4452
|
-
|
|
4451
|
+
var G = new mxGeometry();
|
|
4452
|
+
G.setTerminalPoint(
|
|
4453
4453
|
new mxPoint(
|
|
4454
4454
|
$.x + U,
|
|
4455
4455
|
$.y + I
|
|
4456
4456
|
),
|
|
4457
4457
|
!0
|
|
4458
|
-
),
|
|
4458
|
+
), G.setTerminalPoint(
|
|
4459
4459
|
new mxPoint(
|
|
4460
4460
|
T.x + U,
|
|
4461
4461
|
T.y + I
|
|
4462
4462
|
),
|
|
4463
4463
|
!1
|
|
4464
|
-
), C.setGeometry(
|
|
4464
|
+
), C.setGeometry(G), C.value = h.value, C.type = h.type, C.model = "yes", C.type = "edge", C.iconName = h.iconName, k(C);
|
|
4465
4465
|
} finally {
|
|
4466
4466
|
z.endUpdate();
|
|
4467
4467
|
}
|
|
@@ -4471,8 +4471,8 @@ function Me(t) {
|
|
|
4471
4471
|
const ke = (t, e) => {
|
|
4472
4472
|
let l = { x: 0, y: 0 };
|
|
4473
4473
|
if (t) {
|
|
4474
|
-
let
|
|
4475
|
-
t.horizontalAlign == "start" && (l.x = 0), t.horizontalAlign == "center" && (l.x =
|
|
4474
|
+
let o = e.offsetWidth, r = e.offsetHeight;
|
|
4475
|
+
t.horizontalAlign == "start" && (l.x = 0), t.horizontalAlign == "center" && (l.x = o / 2 - t.width / 2), t.horizontalAlign == "end" && (l.x = o - t.width), t.verticalAlign == "start" && (l.y = 0), t.verticalAlign == "center" && (l.y = r / 2 - t.height / 2), t.verticalAlign == "end" && (l.y = r - t.height);
|
|
4476
4476
|
}
|
|
4477
4477
|
return l;
|
|
4478
4478
|
}, Nt = (t) => {
|
|
@@ -4489,22 +4489,22 @@ function Ee(t) {
|
|
|
4489
4489
|
if (t.attributes.length > 0) {
|
|
4490
4490
|
e.node = {};
|
|
4491
4491
|
for (let l = 0; l < t.attributes.length; l++) {
|
|
4492
|
-
const
|
|
4493
|
-
e.node[
|
|
4492
|
+
const o = t.attributes.item(l);
|
|
4493
|
+
e.node[o.nodeName] = o.nodeValue;
|
|
4494
4494
|
}
|
|
4495
4495
|
}
|
|
4496
4496
|
} else t.nodeType === 3 && (e = t.nodeValue);
|
|
4497
4497
|
if (t.hasChildNodes())
|
|
4498
4498
|
for (let l = 0; l < t.childNodes.length; l++) {
|
|
4499
|
-
const
|
|
4499
|
+
const o = t.childNodes.item(l), r = o.nodeName;
|
|
4500
4500
|
if (typeof e[r] > "u")
|
|
4501
|
-
e[r] = Ee(
|
|
4501
|
+
e[r] = Ee(o);
|
|
4502
4502
|
else {
|
|
4503
4503
|
if (typeof e[r].push > "u") {
|
|
4504
4504
|
const m = e[r];
|
|
4505
4505
|
e[r] = [], e[r].push(m);
|
|
4506
4506
|
}
|
|
4507
|
-
e[r].push(Ee(
|
|
4507
|
+
e[r].push(Ee(o));
|
|
4508
4508
|
}
|
|
4509
4509
|
}
|
|
4510
4510
|
return e;
|
|
@@ -4517,20 +4517,20 @@ function Pt(t) {
|
|
|
4517
4517
|
return e += `<mxGraphModel>
|
|
4518
4518
|
`, e += ` <root>
|
|
4519
4519
|
`, t.root && Array.isArray(t.root.mxCell) && t.root.mxCell.forEach((l) => {
|
|
4520
|
-
e += " <mxCell", l.node && Object.entries(l.node).forEach(([
|
|
4520
|
+
e += " <mxCell", l.node && Object.entries(l.node).forEach(([o, r]) => {
|
|
4521
4521
|
const m = String(r).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
4522
|
-
e += ` ${
|
|
4522
|
+
e += ` ${o}="${m}"`;
|
|
4523
4523
|
}), l.Object || l.mxGeometry ? (e += `>
|
|
4524
4524
|
`, l.Object && (l.Object.node && l.Object.node.as === "value" ? (e += `<Object as="value">
|
|
4525
|
-
`, l.Object.Object && l.Object.Object.node && (e += "<Object ", Object.entries(l.Object.Object.node).forEach(([
|
|
4526
|
-
e += `${
|
|
4525
|
+
`, l.Object.Object && l.Object.Object.node && (e += "<Object ", Object.entries(l.Object.Object.node).forEach(([o, r]) => {
|
|
4526
|
+
e += `${o}="${xe(r)}" `;
|
|
4527
4527
|
}), e += `/>
|
|
4528
4528
|
`), e += `</Object>
|
|
4529
|
-
`) : l.Object.Object && l.Object.Object.node && l.Object.Object.node.as === "style" && (e += ' <Object as="style">', Object.entries(l.Object.Object.node).forEach(([
|
|
4530
|
-
|
|
4529
|
+
`) : l.Object.Object && l.Object.Object.node && l.Object.Object.node.as === "style" && (e += ' <Object as="style">', Object.entries(l.Object.Object.node).forEach(([o, r]) => {
|
|
4530
|
+
o !== "as" && (e += `<${o}>${xe(r)}</${o}>`);
|
|
4531
4531
|
}), e += `</Object>
|
|
4532
|
-
`)), l.mxGeometry && l.mxGeometry.node && (e += " <mxGeometry", Object.entries(l.mxGeometry.node).forEach(([
|
|
4533
|
-
e += ` ${
|
|
4532
|
+
`)), l.mxGeometry && l.mxGeometry.node && (e += " <mxGeometry", Object.entries(l.mxGeometry.node).forEach(([o, r]) => {
|
|
4533
|
+
e += ` ${o}="${xe(r)}"`;
|
|
4534
4534
|
}), e += `/>
|
|
4535
4535
|
`), e += ` </mxCell>
|
|
4536
4536
|
`) : e += `/>
|
|
@@ -4542,7 +4542,7 @@ function xe(t) {
|
|
|
4542
4542
|
return typeof t != "string" && (t = String(t)), t.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
4543
4543
|
}
|
|
4544
4544
|
function Tt(t) {
|
|
4545
|
-
let e = this, l = 10,
|
|
4545
|
+
let e = this, l = 10, o = "#dddddd", r = "#ffffff00", m = 1, p = "square", v = 1, x = 0, g = 0, h = 1, k = null;
|
|
4546
4546
|
e.createGrid = function(z, C, U) {
|
|
4547
4547
|
if (k = z, C) {
|
|
4548
4548
|
var I = document.createElement("canvas");
|
|
@@ -4555,8 +4555,8 @@ function Tt(t) {
|
|
|
4555
4555
|
let $ = C.value.style || {};
|
|
4556
4556
|
$.background && $.background.indexOf("files/") > -1 && $["background-image"] ? I.style.background = `${$["background-image"]} center center no-repeat` : I.style.background = "";
|
|
4557
4557
|
}
|
|
4558
|
-
let
|
|
4559
|
-
|
|
4558
|
+
let G = k.container.querySelector("#gridCanvas_" + C.id);
|
|
4559
|
+
G && G.remove(), k.container.prepend(I), I.width = I.offsetWidth, I.height = I.offsetHeight, U ? o = "transparent" : o = "#dddddd", A(I), I.addEventListener("wheel", function($) {
|
|
4560
4560
|
$.preventDefault();
|
|
4561
4561
|
const T = I.getBoundingClientRect(), Z = $.clientX - T.left, te = $.clientY - T.top, ie = 0.1, oe = $.deltaY < 0 ? 1 : -1, ce = Math.exp(oe * ie), ye = Z / h, fe = te / h;
|
|
4562
4562
|
h *= ce, h = Math.min(Math.max(0.5, h), 5), x = ye - Z / h, g = fe - te / h, A(I), k && (k.view.scale = h, k.refresh());
|
|
@@ -4567,8 +4567,8 @@ function Tt(t) {
|
|
|
4567
4567
|
if (!k) return;
|
|
4568
4568
|
k.snapPoint = function(C, U, I) {
|
|
4569
4569
|
if (!I && this.snapToGrid && l > 0) {
|
|
4570
|
-
const R = l / h,
|
|
4571
|
-
C.x = Math.round(
|
|
4570
|
+
const R = l / h, G = C.x - x, $ = C.y - g;
|
|
4571
|
+
C.x = Math.round(G / R) * R + x, C.y = Math.round($ / R) * R + g;
|
|
4572
4572
|
}
|
|
4573
4573
|
return C;
|
|
4574
4574
|
};
|
|
@@ -4584,8 +4584,8 @@ function Tt(t) {
|
|
|
4584
4584
|
for (let C = 0; C < z.length; C++) {
|
|
4585
4585
|
const U = z[C], I = this.getCellGeometry(U);
|
|
4586
4586
|
if (I) {
|
|
4587
|
-
const R = I.clone(),
|
|
4588
|
-
R.x =
|
|
4587
|
+
const R = I.clone(), G = this.snapPoint({ x: R.x, y: R.y });
|
|
4588
|
+
R.x = G.x, R.y = G.y, this.getModel().setGeometry(U, R);
|
|
4589
4589
|
}
|
|
4590
4590
|
}
|
|
4591
4591
|
} finally {
|
|
@@ -4599,18 +4599,18 @@ function Tt(t) {
|
|
|
4599
4599
|
C.clearRect(0, 0, z.width, z.height), C.fillStyle = r, C.fillRect(0, 0, z.width, z.height);
|
|
4600
4600
|
const U = l * h;
|
|
4601
4601
|
if (U < 2) return;
|
|
4602
|
-
C.strokeStyle =
|
|
4603
|
-
const I = Math.floor(-x * h / U) * U, R = Math.floor(-g * h / U) * U,
|
|
4602
|
+
C.strokeStyle = o, C.lineWidth = m, C.globalAlpha = v;
|
|
4603
|
+
const I = Math.floor(-x * h / U) * U, R = Math.floor(-g * h / U) * U, G = z.width + U, $ = z.height + U;
|
|
4604
4604
|
switch (p) {
|
|
4605
4605
|
case "dotted":
|
|
4606
|
-
C.fillStyle =
|
|
4607
|
-
for (let T = I; T <
|
|
4606
|
+
C.fillStyle = o;
|
|
4607
|
+
for (let T = I; T < G; T += U)
|
|
4608
4608
|
for (let Z = R; Z < $; Z += U)
|
|
4609
4609
|
C.beginPath(), C.arc(T + 0.5, Z + 0.5, m, 0, Math.PI * 2), C.fill();
|
|
4610
4610
|
break;
|
|
4611
4611
|
case "dashed":
|
|
4612
4612
|
C.setLineDash([5, 3]), C.beginPath();
|
|
4613
|
-
for (let T = I; T <
|
|
4613
|
+
for (let T = I; T < G; T += U)
|
|
4614
4614
|
C.moveTo(T + 0.5, 0), C.lineTo(T + 0.5, z.height);
|
|
4615
4615
|
for (let T = R; T < $; T += U)
|
|
4616
4616
|
C.moveTo(0, T + 0.5), C.lineTo(z.width, T + 0.5);
|
|
@@ -4618,7 +4618,7 @@ function Tt(t) {
|
|
|
4618
4618
|
break;
|
|
4619
4619
|
case "square":
|
|
4620
4620
|
C.beginPath();
|
|
4621
|
-
for (let T = I; T <
|
|
4621
|
+
for (let T = I; T < G; T += U)
|
|
4622
4622
|
C.moveTo(T + 0.5, 0), C.lineTo(T + 0.5, z.height);
|
|
4623
4623
|
for (let T = R; T < $; T += U)
|
|
4624
4624
|
C.moveTo(0, T + 0.5), C.lineTo(z.width, T + 0.5);
|
|
@@ -4626,7 +4626,7 @@ function Tt(t) {
|
|
|
4626
4626
|
break;
|
|
4627
4627
|
default:
|
|
4628
4628
|
C.beginPath();
|
|
4629
|
-
for (let T = I; T <
|
|
4629
|
+
for (let T = I; T < G; T += U)
|
|
4630
4630
|
C.moveTo(T + 0.5, 0), C.lineTo(T + 0.5, z.height);
|
|
4631
4631
|
for (let T = R; T < $; T += U)
|
|
4632
4632
|
C.moveTo(0, T + 0.5), C.lineTo(z.width, T + 0.5);
|
|
@@ -4666,7 +4666,7 @@ const It = ["src"], Dt = {
|
|
|
4666
4666
|
},
|
|
4667
4667
|
setup(t) {
|
|
4668
4668
|
const e = t;
|
|
4669
|
-
return (l,
|
|
4669
|
+
return (l, o) => t.style.btntype == "none" ? (P(), D("div", {
|
|
4670
4670
|
key: 0,
|
|
4671
4671
|
class: "btn-index-none",
|
|
4672
4672
|
style: j(t.style)
|
|
@@ -4721,8 +4721,8 @@ const It = ["src"], Dt = {
|
|
|
4721
4721
|
}
|
|
4722
4722
|
}, ae = (t, e) => {
|
|
4723
4723
|
const l = t.__vccOpts || t;
|
|
4724
|
-
for (const [
|
|
4725
|
-
l[
|
|
4724
|
+
for (const [o, r] of e)
|
|
4725
|
+
l[o] = r;
|
|
4726
4726
|
return l;
|
|
4727
4727
|
}, _t = {
|
|
4728
4728
|
name: "VerticalRuler",
|
|
@@ -4758,43 +4758,43 @@ const It = ["src"], Dt = {
|
|
|
4758
4758
|
let e = {};
|
|
4759
4759
|
for (const l in t) {
|
|
4760
4760
|
if (!Object.hasOwn(t, l)) continue;
|
|
4761
|
-
const
|
|
4762
|
-
let m =
|
|
4763
|
-
r === "gap" && (m = `${
|
|
4761
|
+
const o = t[l], r = l.replace(/([A-Z])/g, "-$1").toLowerCase();
|
|
4762
|
+
let m = o;
|
|
4763
|
+
r === "gap" && (m = `${o}px`), (r === "fontSize" || r === "font-size") && (m = `${o}px`), e[r] = m;
|
|
4764
4764
|
}
|
|
4765
4765
|
return e;
|
|
4766
4766
|
}
|
|
4767
4767
|
},
|
|
4768
4768
|
computed: {
|
|
4769
4769
|
getFontStyle() {
|
|
4770
|
-
let t = this, e = t.style,
|
|
4770
|
+
let t = this, e = t.style, o = {
|
|
4771
4771
|
color: e.color,
|
|
4772
4772
|
...e.valuefont
|
|
4773
4773
|
};
|
|
4774
|
-
return t.convertToStyleString(
|
|
4774
|
+
return t.convertToStyleString(o);
|
|
4775
4775
|
},
|
|
4776
4776
|
getScalesFontStyle() {
|
|
4777
|
-
let t = this, e = t.style,
|
|
4777
|
+
let t = this, e = t.style, o = {
|
|
4778
4778
|
color: e.color,
|
|
4779
4779
|
...e.scalefont
|
|
4780
4780
|
};
|
|
4781
|
-
return t.convertToStyleString(
|
|
4781
|
+
return t.convertToStyleString(o);
|
|
4782
4782
|
},
|
|
4783
4783
|
// 计算chart-bottom的高度(与刻度对应)
|
|
4784
4784
|
ywvalue() {
|
|
4785
|
-
const t = this, e = t.getNumber(t.style.value), l = t.getNumber(t.style.max),
|
|
4786
|
-
return p <= 0 ? 0 : (m -
|
|
4785
|
+
const t = this, e = t.getNumber(t.style.value), l = t.getNumber(t.style.max), o = t.getNumber(t.style.min), r = t.getNumber(t.style.layout.height), m = Math.max(o, Math.min(e, l)), p = l - o;
|
|
4786
|
+
return p <= 0 ? 0 : (m - o) / p * r - 8;
|
|
4787
4787
|
},
|
|
4788
4788
|
// 每个刻度的像素间隔
|
|
4789
4789
|
scaleInterval() {
|
|
4790
|
-
const t = this, e = t.getNumber(t.style.max), l = t.getNumber(t.style.min),
|
|
4791
|
-
return r > 1 ?
|
|
4790
|
+
const t = this, e = t.getNumber(t.style.max), l = t.getNumber(t.style.min), o = t.getNumber(t.style.layout.height), r = Math.floor((e - l) / t.style.scales) + 1;
|
|
4791
|
+
return r > 1 ? o / (r - 1) : 0;
|
|
4792
4792
|
},
|
|
4793
4793
|
// 生成刻度值数组(从上到下从大到小)
|
|
4794
4794
|
scaleValues() {
|
|
4795
|
-
const t = this, e = t.getNumber(t.style.max), l = t.getNumber(t.style.min),
|
|
4795
|
+
const t = this, e = t.getNumber(t.style.max), l = t.getNumber(t.style.min), o = t.getNumber(t.style.scales) || 10;
|
|
4796
4796
|
let r = [];
|
|
4797
|
-
for (let m = e; m >= l; m -=
|
|
4797
|
+
for (let m = e; m >= l; m -= o)
|
|
4798
4798
|
r.push(m.toFixed(0));
|
|
4799
4799
|
return r;
|
|
4800
4800
|
}
|
|
@@ -4802,7 +4802,7 @@ const It = ["src"], Dt = {
|
|
|
4802
4802
|
mounted() {
|
|
4803
4803
|
}
|
|
4804
4804
|
}, jt = { class: "ruler-container" };
|
|
4805
|
-
function Ht(t, e, l,
|
|
4805
|
+
function Ht(t, e, l, o, r, m) {
|
|
4806
4806
|
return P(), D("div", jt, [
|
|
4807
4807
|
l.style.scalevisible || l.style.scalevisible == 1 ? (P(), D("div", {
|
|
4808
4808
|
key: 0,
|
|
@@ -4872,48 +4872,48 @@ const $t = /* @__PURE__ */ ae(_t, [["render", Ht], ["__scopeId", "data-v-b14d49d
|
|
|
4872
4872
|
let e = {};
|
|
4873
4873
|
for (const l in t) {
|
|
4874
4874
|
if (!Object.hasOwn(t, l)) continue;
|
|
4875
|
-
const
|
|
4876
|
-
let m =
|
|
4877
|
-
r === "gap" && (m = `${
|
|
4875
|
+
const o = t[l], r = l.replace(/([A-Z])/g, "-$1").toLowerCase();
|
|
4876
|
+
let m = o;
|
|
4877
|
+
r === "gap" && (m = `${o}px`), (r === "fontSize" || r === "font-size") && (m = `${o}px`), e[r] = m;
|
|
4878
4878
|
}
|
|
4879
4879
|
return e;
|
|
4880
4880
|
}
|
|
4881
4881
|
},
|
|
4882
4882
|
computed: {
|
|
4883
4883
|
getFontStyle() {
|
|
4884
|
-
let t = this, e = t.style,
|
|
4884
|
+
let t = this, e = t.style, o = {
|
|
4885
4885
|
color: e.color,
|
|
4886
4886
|
...e.valuefont
|
|
4887
4887
|
};
|
|
4888
|
-
return t.convertToStyleString(
|
|
4888
|
+
return t.convertToStyleString(o);
|
|
4889
4889
|
},
|
|
4890
4890
|
getScalesFontStyle() {
|
|
4891
|
-
let t = this, e = t.style,
|
|
4891
|
+
let t = this, e = t.style, o = {
|
|
4892
4892
|
color: e.color,
|
|
4893
4893
|
...e.scalefont
|
|
4894
4894
|
};
|
|
4895
|
-
return t.convertToStyleString(
|
|
4895
|
+
return t.convertToStyleString(o);
|
|
4896
4896
|
},
|
|
4897
4897
|
// 计算chart-bottom的高度(与刻度对应)
|
|
4898
4898
|
ywvalue() {
|
|
4899
|
-
const t = this, e = t.getNumber(t.style.value), l = t.getNumber(t.style.max),
|
|
4900
|
-
return p <= 0 ? 0 : (m -
|
|
4899
|
+
const t = this, e = t.getNumber(t.style.value), l = t.getNumber(t.style.max), o = t.getNumber(t.style.min), r = t.getNumber(t.style.layout.width), m = Math.max(o, Math.min(e, l)), p = l - o;
|
|
4900
|
+
return p <= 0 ? 0 : (m - o) / p * r;
|
|
4901
4901
|
},
|
|
4902
4902
|
// 每个刻度的像素间隔
|
|
4903
4903
|
scaleInterval() {
|
|
4904
|
-
const t = this, e = t.getNumber(t.style.max), l = t.getNumber(t.style.min),
|
|
4905
|
-
return r > 1 ?
|
|
4904
|
+
const t = this, e = t.getNumber(t.style.max), l = t.getNumber(t.style.min), o = t.getNumber(t.style.layout.width), r = Math.floor((e - l) / t.style.scales) + 1;
|
|
4905
|
+
return r > 1 ? o / (r - 1) : 0;
|
|
4906
4906
|
},
|
|
4907
4907
|
// 生成刻度值数组(从上到下从大到小)
|
|
4908
4908
|
scaleValues() {
|
|
4909
|
-
const t = this, e = t.getNumber(t.style.max), l = t.getNumber(t.style.min),
|
|
4910
|
-
for (let m = l; m < e; m +=
|
|
4909
|
+
const t = this, e = t.getNumber(t.style.max), l = t.getNumber(t.style.min), o = t.getNumber(t.style.scales) || 10, r = [];
|
|
4910
|
+
for (let m = l; m < e; m += o)
|
|
4911
4911
|
r.push(m.toFixed(0));
|
|
4912
4912
|
return r;
|
|
4913
4913
|
}
|
|
4914
4914
|
}
|
|
4915
4915
|
}, Kt = { class: "ruler-h-container" };
|
|
4916
|
-
function Yt(t, e, l,
|
|
4916
|
+
function Yt(t, e, l, o, r, m) {
|
|
4917
4917
|
return P(), D("div", Kt, [
|
|
4918
4918
|
l.style.scalevisible || l.style.scalevisible == 1 ? (P(), D("div", {
|
|
4919
4919
|
key: 0,
|
|
@@ -4969,7 +4969,7 @@ const qt = /* @__PURE__ */ ae(Gt, [["render", Yt], ["__scopeId", "data-v-7f6aaa3
|
|
|
4969
4969
|
}
|
|
4970
4970
|
}
|
|
4971
4971
|
};
|
|
4972
|
-
function Qt(t, e, l,
|
|
4972
|
+
function Qt(t, e, l, o, r, m) {
|
|
4973
4973
|
const p = Ie("index-v"), v = Ie("index-h");
|
|
4974
4974
|
return P(), D("div", {
|
|
4975
4975
|
class: "chart-container",
|
|
@@ -5040,7 +5040,7 @@ const Zt = /* @__PURE__ */ ae(Xt, [["render", Qt], ["__scopeId", "data-v-5f295dc
|
|
|
5040
5040
|
key: 2,
|
|
5041
5041
|
style: { "z-index": "0" }
|
|
5042
5042
|
}, al = { key: 3 };
|
|
5043
|
-
function nl(t, e, l,
|
|
5043
|
+
function nl(t, e, l, o, r, m) {
|
|
5044
5044
|
return P(), D("label", {
|
|
5045
5045
|
class: J(["switch-jd", m.switchClasses])
|
|
5046
5046
|
}, [
|
|
@@ -5116,9 +5116,9 @@ const il = /* @__PURE__ */ ae(Jt, [["render", nl], ["__scopeId", "data-v-3233cda
|
|
|
5116
5116
|
let e = {};
|
|
5117
5117
|
for (const l in t) {
|
|
5118
5118
|
if (!Object.hasOwn(t, l)) continue;
|
|
5119
|
-
const
|
|
5120
|
-
let m =
|
|
5121
|
-
r === "gap" && (m = `${
|
|
5119
|
+
const o = t[l], r = l.replace(/([A-Z])/g, "-$1").toLowerCase();
|
|
5120
|
+
let m = o;
|
|
5121
|
+
r === "gap" && (m = `${o}px`), (r === "fontSize" || r === "font-size") && (m = `${o}px`), e[r] = m;
|
|
5122
5122
|
}
|
|
5123
5123
|
return e;
|
|
5124
5124
|
}
|
|
@@ -5143,7 +5143,7 @@ const il = /* @__PURE__ */ ae(Jt, [["render", nl], ["__scopeId", "data-v-3233cda
|
|
|
5143
5143
|
}
|
|
5144
5144
|
}
|
|
5145
5145
|
}, ol = ["checked", "disabled"];
|
|
5146
|
-
function sl(t, e, l,
|
|
5146
|
+
function sl(t, e, l, o, r, m) {
|
|
5147
5147
|
return P(), D("label", {
|
|
5148
5148
|
class: J(["switch", m.switchClasses])
|
|
5149
5149
|
}, [
|
|
@@ -5177,7 +5177,7 @@ const ul = /* @__PURE__ */ ae(rl, [["render", sl], ["__scopeId", "data-v-41ace2e
|
|
|
5177
5177
|
},
|
|
5178
5178
|
setup(t) {
|
|
5179
5179
|
const e = t, l = it(e.style.realValue === "true");
|
|
5180
|
-
return (
|
|
5180
|
+
return (o, r) => t.style.btntype == "none" ? (P(), D("div", {
|
|
5181
5181
|
key: 0,
|
|
5182
5182
|
class: "switch-none",
|
|
5183
5183
|
style: j(t.style)
|
|
@@ -5218,17 +5218,17 @@ const ul = /* @__PURE__ */ ae(rl, [["render", sl], ["__scopeId", "data-v-41ace2e
|
|
|
5218
5218
|
},
|
|
5219
5219
|
setup(t) {
|
|
5220
5220
|
const e = t, l = Ae(() => {
|
|
5221
|
-
let
|
|
5221
|
+
let o = e.style.layout || {};
|
|
5222
5222
|
return {
|
|
5223
|
-
width:
|
|
5224
|
-
height:
|
|
5223
|
+
width: o.width + "px",
|
|
5224
|
+
height: o.height + "px",
|
|
5225
5225
|
borderWidth: (e.style.borderValue || 1) + "px",
|
|
5226
5226
|
padding: (e.style.borderValue || 1) + "px",
|
|
5227
5227
|
borderColor: e.style.stroke || "#000000",
|
|
5228
5228
|
backgroundColor: e.style.background || "#D1E7FF"
|
|
5229
5229
|
};
|
|
5230
5230
|
});
|
|
5231
|
-
return (
|
|
5231
|
+
return (o, r) => (P(), D("div", {
|
|
5232
5232
|
class: "gr-circle",
|
|
5233
5233
|
style: j(l.value)
|
|
5234
5234
|
}, [
|
|
@@ -5248,17 +5248,17 @@ const ul = /* @__PURE__ */ ae(rl, [["render", sl], ["__scopeId", "data-v-41ace2e
|
|
|
5248
5248
|
},
|
|
5249
5249
|
setup(t) {
|
|
5250
5250
|
const e = t, l = Ae(() => {
|
|
5251
|
-
let
|
|
5251
|
+
let o = e.style.layout || {};
|
|
5252
5252
|
return {
|
|
5253
|
-
width:
|
|
5254
|
-
height:
|
|
5253
|
+
width: o.width + "px",
|
|
5254
|
+
height: o.height + "px",
|
|
5255
5255
|
borderWidth: (e.style.borderValue || 1) + "px",
|
|
5256
5256
|
padding: (e.style.borderValue || 1) + "px",
|
|
5257
5257
|
borderColor: e.style.stroke || "#000000",
|
|
5258
5258
|
backgroundColor: e.style.background || "#D1E7FF"
|
|
5259
5259
|
};
|
|
5260
5260
|
});
|
|
5261
|
-
return (
|
|
5261
|
+
return (o, r) => (P(), D("div", {
|
|
5262
5262
|
class: "gr-rectangle",
|
|
5263
5263
|
style: j(l.value)
|
|
5264
5264
|
}, [
|
|
@@ -5278,7 +5278,7 @@ const ul = /* @__PURE__ */ ae(rl, [["render", sl], ["__scopeId", "data-v-41ace2e
|
|
|
5278
5278
|
},
|
|
5279
5279
|
setup(t) {
|
|
5280
5280
|
const e = t, l = Ae(() => {
|
|
5281
|
-
let
|
|
5281
|
+
let o = e.style.layout || {}, { x: r, y: m, width: p, height: v } = o, x = e.style.borderValue / 2, g = `${r + p / 2},${m + x}`, h = `${r + x},${m + v - x}`, k = `${r + p - x},${m + v - x}`;
|
|
5282
5282
|
return `
|
|
5283
5283
|
<svg width="${p}" height="${v}" xmlns="http://www.w3.org/2000/svg" viewBox="${r} ${m} ${p} ${v}">
|
|
5284
5284
|
<polygon points="${g} ${h} ${k}" fill="${e.style.fillColor || "#D1E7FF"}" stroke="${e.style.stroke || "#000000"}" stroke-width="${e.style.borderValue || 1}"/>
|
|
@@ -5294,13 +5294,13 @@ const ul = /* @__PURE__ */ ae(rl, [["render", sl], ["__scopeId", "data-v-41ace2e
|
|
|
5294
5294
|
</svg>
|
|
5295
5295
|
`;
|
|
5296
5296
|
});
|
|
5297
|
-
return (
|
|
5297
|
+
return (o, r) => (P(), D("div", {
|
|
5298
5298
|
class: "gr-triangle",
|
|
5299
5299
|
innerHTML: l.value
|
|
5300
5300
|
}, null, 8, vl));
|
|
5301
5301
|
}
|
|
5302
5302
|
}, Cl = /* @__PURE__ */ ae(bl, [["__scopeId", "data-v-25fd969b"]]), wl = (t, e, l) => {
|
|
5303
|
-
const
|
|
5303
|
+
const o = document.createDocumentFragment();
|
|
5304
5304
|
let m = kl({}, e.data);
|
|
5305
5305
|
e.style.background === "transparent" && delete e.style.background, e.style.color === "transparent" && delete e.style.color, e.style = { ...e.style, ...m };
|
|
5306
5306
|
let p = "";
|
|
@@ -5328,13 +5328,13 @@ const ul = /* @__PURE__ */ ae(rl, [["render", sl], ["__scopeId", "data-v-41ace2e
|
|
|
5328
5328
|
return h;
|
|
5329
5329
|
}
|
|
5330
5330
|
});
|
|
5331
|
-
return x.use(ct), x.use(mt), x.mount(
|
|
5331
|
+
return x.use(ct), x.use(mt), x.mount(o).$el.outerHTML;
|
|
5332
5332
|
};
|
|
5333
5333
|
function kl(t, e) {
|
|
5334
5334
|
if (!e.children)
|
|
5335
5335
|
return "";
|
|
5336
|
-
let
|
|
5337
|
-
return
|
|
5336
|
+
let o = e.children.filter((r) => r.animate && (r.animate.isShow || r.animate.isShow == 1));
|
|
5337
|
+
return o && o.length > 0 && o.forEach((r) => {
|
|
5338
5338
|
if (r.key === "background" || r.key === "color" || r.key === "image") {
|
|
5339
5339
|
let m = r.animate.data, p = r.animate.mpType, v = null;
|
|
5340
5340
|
if (p === "NumericToSimple") {
|
|
@@ -5352,7 +5352,7 @@ function kl(t, e) {
|
|
|
5352
5352
|
}), t;
|
|
5353
5353
|
}
|
|
5354
5354
|
function xl(t, e, l) {
|
|
5355
|
-
let
|
|
5355
|
+
let o = t.value, r = Sl(o);
|
|
5356
5356
|
return r >= e && r <= l;
|
|
5357
5357
|
}
|
|
5358
5358
|
function Sl(t) {
|
|
@@ -5383,10 +5383,10 @@ function El(t) {
|
|
|
5383
5383
|
!0
|
|
5384
5384
|
), r.end();
|
|
5385
5385
|
}, mxCellRenderer.registerShape("singleArrow", l);
|
|
5386
|
-
function
|
|
5386
|
+
function o() {
|
|
5387
5387
|
mxActor.call(this);
|
|
5388
5388
|
}
|
|
5389
|
-
mxUtils.extend(
|
|
5389
|
+
mxUtils.extend(o, mxActor), o.prototype.redrawPath = function(r, m, p, v, x) {
|
|
5390
5390
|
var g = x * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.style, "arrowWidth", l.prototype.arrowWidth)))), h = v * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.style, "arrowSize", l.prototype.arrowSize)))), k = (x - g) / 2, N = k + g, A = mxUtils.getValue(this.style, mxConstants.STYLE_ARCSIZE, mxConstants.LINE_ARCSIZE) / 2;
|
|
5391
5391
|
this.addPoints(
|
|
5392
5392
|
r,
|
|
@@ -5406,7 +5406,7 @@ function El(t) {
|
|
|
5406
5406
|
A,
|
|
5407
5407
|
!0
|
|
5408
5408
|
), r.end();
|
|
5409
|
-
}, mxCellRenderer.registerShape("doubleArrow",
|
|
5409
|
+
}, mxCellRenderer.registerShape("doubleArrow", o);
|
|
5410
5410
|
};
|
|
5411
5411
|
}
|
|
5412
5412
|
function je(t) {
|
|
@@ -5435,37 +5435,37 @@ function je(t) {
|
|
|
5435
5435
|
if (e.preview) {
|
|
5436
5436
|
if (u && u.length > 0)
|
|
5437
5437
|
for (let d = 0; d < u.length; d++) {
|
|
5438
|
-
let
|
|
5439
|
-
|
|
5438
|
+
let s = u[d];
|
|
5439
|
+
s && (s.classList.remove("is-hidden"), s.classList.add("is-block"));
|
|
5440
5440
|
}
|
|
5441
5441
|
} else if (u && u.length > 0)
|
|
5442
5442
|
for (let d = 0; d < u.length; d++) {
|
|
5443
|
-
let
|
|
5444
|
-
|
|
5443
|
+
let s = u[d];
|
|
5444
|
+
s && (s.classList.remove("is-block"), s.classList.add("is-hidden"));
|
|
5445
5445
|
}
|
|
5446
5446
|
if (e.preview && n.clearSelection(), e.preview) {
|
|
5447
5447
|
const d = n.container.querySelectorAll(".bg-light");
|
|
5448
5448
|
if (d)
|
|
5449
|
-
for (let
|
|
5450
|
-
d[
|
|
5449
|
+
for (let s = 0; s < d.length; s++)
|
|
5450
|
+
d[s].classList.replace("bg-light", "main-text");
|
|
5451
5451
|
} else {
|
|
5452
5452
|
const d = n.container.querySelectorAll(".main-text");
|
|
5453
5453
|
if (d)
|
|
5454
|
-
for (let
|
|
5455
|
-
d[
|
|
5454
|
+
for (let s = 0; s < d.length; s++)
|
|
5455
|
+
d[s].classList.replace("main-text", "bg-light");
|
|
5456
5456
|
}
|
|
5457
5457
|
if (e.preview) {
|
|
5458
5458
|
const d = n.container.querySelectorAll(".bg-creat-comp");
|
|
5459
5459
|
if (d)
|
|
5460
|
-
for (let
|
|
5461
|
-
const i = d[
|
|
5460
|
+
for (let s = 0; s < d.length; s++) {
|
|
5461
|
+
const i = d[s];
|
|
5462
5462
|
i && i.classList.add("svg-preview-gr");
|
|
5463
5463
|
}
|
|
5464
5464
|
} else {
|
|
5465
5465
|
const d = n.container.querySelectorAll(".svg-preview-gr");
|
|
5466
5466
|
if (d)
|
|
5467
|
-
for (let
|
|
5468
|
-
const i = d[
|
|
5467
|
+
for (let s = 0; s < d.length; s++) {
|
|
5468
|
+
const i = d[s];
|
|
5469
5469
|
i && i.classList.remove("svg-preview-gr");
|
|
5470
5470
|
}
|
|
5471
5471
|
}
|
|
@@ -5473,8 +5473,8 @@ function je(t) {
|
|
|
5473
5473
|
}, e.init = (a) => {
|
|
5474
5474
|
let { container: n } = a;
|
|
5475
5475
|
return new Promise((u, d) => {
|
|
5476
|
-
let
|
|
5477
|
-
n.setAttribute("tabindex", "0"), n.style.outline = "none", n.style.width = "100%", n.style.height = "100%",
|
|
5476
|
+
let s = new mxEditor(), i = s.graph;
|
|
5477
|
+
n.setAttribute("tabindex", "0"), n.style.outline = "none", n.style.width = "100%", n.style.height = "100%", s.setGraphContainer(n), e.container = n, e.editor = s, St(s), mxEvent.disableContextMenu(n);
|
|
5478
5478
|
const c = i.getStylesheet().getDefaultVertexStyle();
|
|
5479
5479
|
Object.assign(c, {
|
|
5480
5480
|
// // 去掉填充色(设置为透明)
|
|
@@ -5534,7 +5534,7 @@ function je(t) {
|
|
|
5534
5534
|
e.firstStyle = !1;
|
|
5535
5535
|
}
|
|
5536
5536
|
}, i.view.scaleGrid = !0, i.view.roundPoints = !0, mxSvgCanvas2D.prototype.updateTextNodes = function(w, E, L, O, M, B, F, V, H, W, q) {
|
|
5537
|
-
var
|
|
5537
|
+
var K = this.state.scale;
|
|
5538
5538
|
mxSvgCanvas2D.createCss(
|
|
5539
5539
|
L + 2,
|
|
5540
5540
|
O,
|
|
@@ -5547,12 +5547,12 @@ function je(t) {
|
|
|
5547
5547
|
this.state.fontBorderColor != null ? this.state.fontBorderColor : null,
|
|
5548
5548
|
"display: flex; align-items: unsafe " + (B == mxConstants.ALIGN_TOP ? "flex-start" : B == mxConstants.ALIGN_BOTTOM ? "flex-end" : "center") + "; justify-content: unsafe " + (M == mxConstants.ALIGN_LEFT ? "flex-start" : M == mxConstants.ALIGN_RIGHT ? "flex-end" : "center") + "; ",
|
|
5549
5549
|
this.getTextCss(),
|
|
5550
|
-
|
|
5550
|
+
K,
|
|
5551
5551
|
mxUtils.bind(this, function(ne, re, Y, se, X) {
|
|
5552
5552
|
w += this.state.dx, E += this.state.dy;
|
|
5553
|
-
var he = q.firstChild, Ue = he.firstChild, Le = Ue.firstChild, et = Le.firstChild, Pe = (this.rotateHtml ? this.state.rotation : 0) + (W ?? 0), Ce = (this.foOffset != 0 ? "translate(" + this.foOffset + " " + this.foOffset + ")" : "") + (
|
|
5554
|
-
et.setAttribute("style", X), Le.setAttribute("style", se), he.setAttribute("width", Math.ceil(1 / Math.min(1,
|
|
5555
|
-
let ge = Math.round(E + re), tt = Math.round(w + ne), lt =
|
|
5553
|
+
var he = q.firstChild, Ue = he.firstChild, Le = Ue.firstChild, et = Le.firstChild, Pe = (this.rotateHtml ? this.state.rotation : 0) + (W ?? 0), Ce = (this.foOffset != 0 ? "translate(" + this.foOffset + " " + this.foOffset + ")" : "") + (K != 1 ? "scale(" + K + ")" : "");
|
|
5554
|
+
et.setAttribute("style", X), Le.setAttribute("style", se), he.setAttribute("width", Math.ceil(1 / Math.min(1, K) * 100) + "%"), he.setAttribute("height", Math.ceil(1 / Math.min(1, K) * 100) + "%");
|
|
5555
|
+
let ge = Math.round(E + re), tt = Math.round(w + ne), lt = o(ge), at = o(tt);
|
|
5556
5556
|
if (ge < 0)
|
|
5557
5557
|
he.setAttribute("y", ge);
|
|
5558
5558
|
else {
|
|
@@ -5568,14 +5568,14 @@ function je(t) {
|
|
|
5568
5568
|
}, i.fit(), r(), u(i);
|
|
5569
5569
|
});
|
|
5570
5570
|
};
|
|
5571
|
-
function
|
|
5571
|
+
function o(a) {
|
|
5572
5572
|
let n = !0;
|
|
5573
5573
|
return a % 2 === 0 ? n = !0 : n = !1, n;
|
|
5574
5574
|
}
|
|
5575
5575
|
function r(a) {
|
|
5576
5576
|
mxVertexHandler.prototype.getHandleForEvent = function(n) {
|
|
5577
5577
|
let u = n.getEvent(), d = ["nw-resize", "n-resize", "ne-resize", "w-resize", "e-resize", "sw-resize", "s-resize", "se-resize"];
|
|
5578
|
-
var
|
|
5578
|
+
var s = u.target || u.srcElement, i = window.getComputedStyle(s).cursor;
|
|
5579
5579
|
if (d.indexOf(i) != -1) {
|
|
5580
5580
|
var y = mxEvent.isMouseEvent(n.getEvent()) ? 1 : this.tolerance, c = this.allowHandleBoundsCheck && (mxClient.IS_IE || y > 0) ? new mxRectangle(n.getGraphX() - y, n.getGraphY() - y, 2 * y, 2 * y) : null, f = mxUtils.bind(this, function(S) {
|
|
5581
5581
|
var w = S != null && S.constructor != mxImageShape && this.allowHandleBoundsCheck ? S.strokewidth + S.svgStrokeTolerance : null, E = w != null ? new mxRectangle(
|
|
@@ -5606,8 +5606,8 @@ function je(t) {
|
|
|
5606
5606
|
}
|
|
5607
5607
|
e.keyUpdownEvent = (a) => {
|
|
5608
5608
|
let n = e.graph, u = e.undoMng;
|
|
5609
|
-
e.keyUpdownEvt.keyUpdown(n, u, function(
|
|
5610
|
-
(
|
|
5609
|
+
e.keyUpdownEvt.keyUpdown(n, u, function(s) {
|
|
5610
|
+
(s === "undo" || s === "redo") && e.changePageSize();
|
|
5611
5611
|
});
|
|
5612
5612
|
}, e.removeKeyUpDown = () => {
|
|
5613
5613
|
let a = e.graph;
|
|
@@ -5617,8 +5617,8 @@ function je(t) {
|
|
|
5617
5617
|
return new Promise((n, u) => {
|
|
5618
5618
|
let d = new Image();
|
|
5619
5619
|
d.src = `${a}`, d.onload = async function() {
|
|
5620
|
-
let
|
|
5621
|
-
n({ w:
|
|
5620
|
+
let s = d.width, i = d.height;
|
|
5621
|
+
n({ w: s, h: i });
|
|
5622
5622
|
};
|
|
5623
5623
|
});
|
|
5624
5624
|
}
|
|
@@ -5626,11 +5626,11 @@ function je(t) {
|
|
|
5626
5626
|
let n = {};
|
|
5627
5627
|
if (a.border) {
|
|
5628
5628
|
let d = a.border.split(",");
|
|
5629
|
-
d.length == 1 ? d.forEach((
|
|
5630
|
-
let y =
|
|
5629
|
+
d.length == 1 ? d.forEach((s, i) => {
|
|
5630
|
+
let y = s.split(" "), c = "";
|
|
5631
5631
|
n["border" + c + "Width"] = y[0], n["border" + c + "Style"] = y[1], n["border" + c + "Color"] = y[2];
|
|
5632
|
-
}) : d.forEach((
|
|
5633
|
-
let y =
|
|
5632
|
+
}) : d.forEach((s, i) => {
|
|
5633
|
+
let y = s.split(" "), c = "Top";
|
|
5634
5634
|
i == 0 ? c = "Top" : i == 1 ? c = "Right" : i == 2 ? c = "Bottom" : i == 3 && (c = "Left"), n["border" + c + "Width"] = y[0], n["border" + c + "Style"] = y[1], n["border" + c + "Color"] = y[2];
|
|
5635
5635
|
});
|
|
5636
5636
|
}
|
|
@@ -5638,7 +5638,7 @@ function je(t) {
|
|
|
5638
5638
|
};
|
|
5639
5639
|
function p(a) {
|
|
5640
5640
|
a.convertValueToString = function(n) {
|
|
5641
|
-
let { width: u, height: d, x:
|
|
5641
|
+
let { width: u, height: d, x: s, y: i } = n.geometry;
|
|
5642
5642
|
if (n.type == "vertex")
|
|
5643
5643
|
return v(n);
|
|
5644
5644
|
if (n.type == "kitUI:CanvasWidget") {
|
|
@@ -5716,7 +5716,7 @@ function je(t) {
|
|
|
5716
5716
|
};
|
|
5717
5717
|
}
|
|
5718
5718
|
function v(a) {
|
|
5719
|
-
let { width: n, height: u, x: d, y:
|
|
5719
|
+
let { width: n, height: u, x: d, y: s } = a.geometry;
|
|
5720
5720
|
k(a);
|
|
5721
5721
|
let i = a.value.style, y = a.value.data.children, c = {};
|
|
5722
5722
|
y && (c = y.find((b) => b.key === "text"));
|
|
@@ -5738,7 +5738,7 @@ function je(t) {
|
|
|
5738
5738
|
}
|
|
5739
5739
|
e.isDragging = !1, e.dragTerminal = null, e.startPos = null, e.dx = null, e.dy = null, e.ctrlKey = !1, e.moveEdgeCells = [];
|
|
5740
5740
|
function g(a, n, u, d) {
|
|
5741
|
-
return new Promise((
|
|
5741
|
+
return new Promise((s, i) => {
|
|
5742
5742
|
let y = a.getDefaultParent(), c = a.getModel();
|
|
5743
5743
|
c.beginUpdate();
|
|
5744
5744
|
try {
|
|
@@ -5766,7 +5766,7 @@ function je(t) {
|
|
|
5766
5766
|
E.y + d
|
|
5767
5767
|
),
|
|
5768
5768
|
!1
|
|
5769
|
-
), f.setGeometry(S), f.value = n.value, f.type = n.type, f.model = "yes", f.type = "edge", f.iconName = n.iconName,
|
|
5769
|
+
), f.setGeometry(S), f.value = n.value, f.type = n.type, f.model = "yes", f.type = "edge", f.iconName = n.iconName, s(f);
|
|
5770
5770
|
} finally {
|
|
5771
5771
|
c.endUpdate();
|
|
5772
5772
|
}
|
|
@@ -5782,9 +5782,9 @@ function je(t) {
|
|
|
5782
5782
|
let i = a.getPointForEvent(d);
|
|
5783
5783
|
e.startPos = i, u.consume();
|
|
5784
5784
|
}
|
|
5785
|
-
let
|
|
5786
|
-
if (
|
|
5787
|
-
let i = a.getPointForEvent(d), y =
|
|
5785
|
+
let s = a.getSelectionCell();
|
|
5786
|
+
if (s && s.isEdge()) {
|
|
5787
|
+
let i = a.getPointForEvent(d), y = s.getGeometry(), c = y.getTerminalPoint(!0), f = y.getTerminalPoint(!1), b = x(i, c), S = x(i, f);
|
|
5788
5788
|
b < 15 && (e.isDragging = !0, e.dragTerminal = !0, e.startPos = i, u.consume()), S < 15 && (e.isDragging = !0, e.dragTerminal = !1, e.startPos = i, u.consume());
|
|
5789
5789
|
}
|
|
5790
5790
|
u.consume();
|
|
@@ -5792,17 +5792,17 @@ function je(t) {
|
|
|
5792
5792
|
mouseMove: function(n, u) {
|
|
5793
5793
|
let d = u.evt;
|
|
5794
5794
|
if (e.ctrlKey = d.ctrlKey, e.ctrlKey) {
|
|
5795
|
-
let
|
|
5795
|
+
let s = a.getPointForEvent(d), i = s.x, y = s.y;
|
|
5796
5796
|
e.dx = i, e.dy = y, u.consume();
|
|
5797
5797
|
} else if (e.isDragging && e.dragTerminal !== null) {
|
|
5798
|
-
let
|
|
5798
|
+
let s = a.getPointForEvent(d), i = s.x, y = s.y;
|
|
5799
5799
|
e.dx = i, e.dy = y, u.consume();
|
|
5800
5800
|
}
|
|
5801
5801
|
u.consume();
|
|
5802
5802
|
},
|
|
5803
5803
|
mouseUp: function(n, u) {
|
|
5804
|
-
let d = u.evt,
|
|
5805
|
-
|
|
5804
|
+
let d = u.evt, s = a.getModel();
|
|
5805
|
+
s.beginUpdate();
|
|
5806
5806
|
try {
|
|
5807
5807
|
if (e.ctrlKey && d.ctrlKey && e.dx !== null && e.dy !== null) {
|
|
5808
5808
|
let i = e.moveEdgeCells;
|
|
@@ -5830,20 +5830,20 @@ function je(t) {
|
|
|
5830
5830
|
}, 1), u.consume();
|
|
5831
5831
|
}
|
|
5832
5832
|
} finally {
|
|
5833
|
-
|
|
5833
|
+
s.endUpdate();
|
|
5834
5834
|
}
|
|
5835
5835
|
u.consume();
|
|
5836
5836
|
}
|
|
5837
5837
|
});
|
|
5838
5838
|
}
|
|
5839
5839
|
const k = (a) => {
|
|
5840
|
-
let { width: n, height: u, x: d, y:
|
|
5840
|
+
let { width: n, height: u, x: d, y: s } = a.geometry, i = a.value.style;
|
|
5841
5841
|
if (i && i.hasOwnProperty("layout")) {
|
|
5842
5842
|
let y = a.value.data, c = {
|
|
5843
5843
|
width: n,
|
|
5844
5844
|
height: u,
|
|
5845
5845
|
x: d,
|
|
5846
|
-
y:
|
|
5846
|
+
y: s
|
|
5847
5847
|
}, f = y.children;
|
|
5848
5848
|
if (f && f.length > 0) {
|
|
5849
5849
|
let b = f.find((S) => S.key == "layout");
|
|
@@ -5853,8 +5853,8 @@ function je(t) {
|
|
|
5853
5853
|
}
|
|
5854
5854
|
};
|
|
5855
5855
|
function N(a) {
|
|
5856
|
-
let { img: n, text: u, style: d } = a,
|
|
5857
|
-
return n && (
|
|
5856
|
+
let { img: n, text: u, style: d } = a, s = "";
|
|
5857
|
+
return n && (s += `<img src='${n}' style="z-index: 0;" alt=" " v-if='${n}'>`), u && (d ? s += `<span style="z-index: 0;${d}">${u}</span>` : s += `<span style="z-index: 0;">${u}</span>`), !n && !u ? "<span> </span>" : s;
|
|
5858
5858
|
}
|
|
5859
5859
|
function A(a) {
|
|
5860
5860
|
new Tt().createGrid(a, e.parent, e.preview), a.gridEnabled = !0, a.gridSize = 10;
|
|
@@ -5899,13 +5899,13 @@ function je(t) {
|
|
|
5899
5899
|
return "";
|
|
5900
5900
|
let u = {};
|
|
5901
5901
|
for (const d in a)
|
|
5902
|
-
n.some((
|
|
5902
|
+
n.some((s) => d.startsWith(s)) && (u[d] = a[d]);
|
|
5903
5903
|
return u && Object.keys(u).length === 0 ? "" : Object.entries(u).filter(
|
|
5904
|
-
([d,
|
|
5905
|
-
).map(([d,
|
|
5904
|
+
([d, s]) => s != null && s !== "" && !(typeof s == "object" && Object.keys(s).length === 0)
|
|
5905
|
+
).map(([d, s]) => {
|
|
5906
5906
|
const i = d.replace(/([A-Z])/g, "-$1").toLowerCase();
|
|
5907
|
-
let y =
|
|
5908
|
-
return i === "gap" && (y = `${
|
|
5907
|
+
let y = s;
|
|
5908
|
+
return i === "gap" && (y = `${s}px`), `${i}:${y}`;
|
|
5909
5909
|
}).join("; ") + ";";
|
|
5910
5910
|
}
|
|
5911
5911
|
function U(a, n) {
|
|
@@ -5915,11 +5915,11 @@ function je(t) {
|
|
|
5915
5915
|
for (const d in a)
|
|
5916
5916
|
n.indexOf(d) === -1 && (u[d] = a[d]);
|
|
5917
5917
|
return u && Object.keys(u).length === 0 ? "" : Object.entries(u).filter(
|
|
5918
|
-
([d,
|
|
5919
|
-
).map(([d,
|
|
5918
|
+
([d, s]) => s != null && s !== "" && !(typeof s == "object" && Object.keys(s).length === 0)
|
|
5919
|
+
).map(([d, s]) => {
|
|
5920
5920
|
const i = d.replace(/([A-Z])/g, "-$1").toLowerCase();
|
|
5921
|
-
let y =
|
|
5922
|
-
return i === "gap" && (y = `${
|
|
5921
|
+
let y = s;
|
|
5922
|
+
return i === "gap" && (y = `${s}px`), `${i}:${y}`;
|
|
5923
5923
|
}).join("; ") + ";";
|
|
5924
5924
|
}
|
|
5925
5925
|
function I(a) {
|
|
@@ -5929,45 +5929,45 @@ function je(t) {
|
|
|
5929
5929
|
([n, u]) => u != null && u !== "" && !(typeof u == "object" && Object.keys(u).length === 0)
|
|
5930
5930
|
).map(([n, u]) => {
|
|
5931
5931
|
const d = n.replace(/([A-Z])/g, "-$1").toLowerCase();
|
|
5932
|
-
let
|
|
5933
|
-
return d === "gap" && (
|
|
5932
|
+
let s = u;
|
|
5933
|
+
return d === "gap" && (s = u.toString().indexOf("px") === -1 ? `${u}px` : u), `${d}: ${s}`;
|
|
5934
5934
|
}).join("; ") + ";") : "";
|
|
5935
5935
|
}
|
|
5936
5936
|
function R(a, n) {
|
|
5937
5937
|
return a ? Object.entries(a).filter(
|
|
5938
|
-
([d,
|
|
5939
|
-
).map(([d,
|
|
5938
|
+
([d, s]) => s != null && s !== "" && !(typeof s == "object" && Object.keys(s).length === 0)
|
|
5939
|
+
).map(([d, s]) => {
|
|
5940
5940
|
let i = d;
|
|
5941
5941
|
n || (i = d.replace(/([A-Z])/g, "-$1").toLowerCase());
|
|
5942
|
-
let y =
|
|
5943
|
-
return i === "gap" && (y = `${
|
|
5942
|
+
let y = s;
|
|
5943
|
+
return i === "gap" && (y = `${s}px`), `${i}=${y}`;
|
|
5944
5944
|
}).join("; ") + ";" : "";
|
|
5945
5945
|
}
|
|
5946
|
-
function
|
|
5946
|
+
function G(a) {
|
|
5947
5947
|
const u = String(a).match(/\d+/);
|
|
5948
5948
|
return u ? Number(u[0]) : null;
|
|
5949
5949
|
}
|
|
5950
5950
|
function $(a, n, u) {
|
|
5951
|
-
let d = a.value,
|
|
5952
|
-
return n === "-inf" ?
|
|
5951
|
+
let d = a.value, s = G(d);
|
|
5952
|
+
return n === "-inf" ? s <= u : u === "+inf" ? s >= n : s >= n && s <= u;
|
|
5953
5953
|
}
|
|
5954
5954
|
function T(a, n) {
|
|
5955
5955
|
if (!n.children)
|
|
5956
5956
|
return "";
|
|
5957
|
-
let d = n.children.filter((
|
|
5958
|
-
return d && d.length > 0 && d.forEach((
|
|
5959
|
-
if (
|
|
5960
|
-
let i =
|
|
5957
|
+
let d = n.children.filter((s) => s.animate && (s.animate.isShow || s.animate.isShow == 1));
|
|
5958
|
+
return d && d.length > 0 && d.forEach((s) => {
|
|
5959
|
+
if (s.key === "background" || s.key === "color" || s.key === "image") {
|
|
5960
|
+
let i = s.animate.data, y = s.animate.mpType, c = null;
|
|
5961
5961
|
if (y === "NumericToSimple") {
|
|
5962
|
-
let f = i.find((b) => $(
|
|
5963
|
-
f ? c = f :
|
|
5964
|
-
value:
|
|
5965
|
-
valueUrl:
|
|
5962
|
+
let f = i.find((b) => $(s, b.min, b.max));
|
|
5963
|
+
f ? c = f : s.key === "image" ? c = {
|
|
5964
|
+
value: s.animate.default,
|
|
5965
|
+
valueUrl: s.animate.defaultVal
|
|
5966
5966
|
} : c = {
|
|
5967
|
-
value:
|
|
5967
|
+
value: s.animate.default
|
|
5968
5968
|
};
|
|
5969
|
-
} else y === "BooleanToSimple" && (c = i.find((f) => f.key ===
|
|
5970
|
-
c && (a[
|
|
5969
|
+
} else y === "BooleanToSimple" && (c = i.find((f) => f.key === s.realValue));
|
|
5970
|
+
c && (a[s.key] = c.value, s.key === "image" && (a.imgUrl = `${c.valueUrl}`));
|
|
5971
5971
|
}
|
|
5972
5972
|
}), a;
|
|
5973
5973
|
}
|
|
@@ -5996,7 +5996,7 @@ function je(t) {
|
|
|
5996
5996
|
n.refresh();
|
|
5997
5997
|
return;
|
|
5998
5998
|
}
|
|
5999
|
-
const
|
|
5999
|
+
const s = u.undoableEditHappened;
|
|
6000
6000
|
try {
|
|
6001
6001
|
u.undoableEditHappened = function() {
|
|
6002
6002
|
}, d.beginUpdate();
|
|
@@ -6018,14 +6018,14 @@ function je(t) {
|
|
|
6018
6018
|
d.endUpdate();
|
|
6019
6019
|
}
|
|
6020
6020
|
} finally {
|
|
6021
|
-
u.undoableEditHappened =
|
|
6021
|
+
u.undoableEditHappened = s;
|
|
6022
6022
|
}
|
|
6023
6023
|
}, e.updateCell = (a, n) => {
|
|
6024
6024
|
let u = e.graph;
|
|
6025
6025
|
const d = u.getModel();
|
|
6026
6026
|
d.beginUpdate();
|
|
6027
6027
|
try {
|
|
6028
|
-
let
|
|
6028
|
+
let s = a.value.style;
|
|
6029
6029
|
if (n && n.layout && Object.keys(n.layout).length > 0) {
|
|
6030
6030
|
const y = n.layout;
|
|
6031
6031
|
if (y) {
|
|
@@ -6035,16 +6035,16 @@ function je(t) {
|
|
|
6035
6035
|
}
|
|
6036
6036
|
d.setValue(a, a.value);
|
|
6037
6037
|
let i = "";
|
|
6038
|
-
a.type === "rect" ? i = te(a, n) : a.type === "edge" ? (e.firstFlag = !0, i = Z(a, n)) : a.type === "kitUI:CanvasWidget" ? (i = T(
|
|
6038
|
+
a.type === "rect" ? i = te(a, n) : a.type === "edge" ? (e.firstFlag = !0, i = Z(a, n)) : a.type === "kitUI:CanvasWidget" ? (i = T(s, a.value.data), e.changePageSize(s)) : i = T(s, a.value.data), Et(e.graph, a, i);
|
|
6039
6039
|
} finally {
|
|
6040
6040
|
d.endUpdate();
|
|
6041
6041
|
}
|
|
6042
6042
|
u.refresh();
|
|
6043
6043
|
};
|
|
6044
6044
|
function Z(a, n) {
|
|
6045
|
-
let u = e.graph, d = "",
|
|
6046
|
-
if (
|
|
6047
|
-
const y = { ...ie(
|
|
6045
|
+
let u = e.graph, d = "", s = a.style || "";
|
|
6046
|
+
if (s) {
|
|
6047
|
+
const y = { ...ie(s), ...n };
|
|
6048
6048
|
d = R(y, !0), a.value.style = y, a.setStyle(d), T(a.value.style, a.value.data), u.refresh(a);
|
|
6049
6049
|
}
|
|
6050
6050
|
return d;
|
|
@@ -6052,9 +6052,9 @@ function je(t) {
|
|
|
6052
6052
|
function te(a, n) {
|
|
6053
6053
|
let u = "", d = a.style || "";
|
|
6054
6054
|
if (d) {
|
|
6055
|
-
let
|
|
6056
|
-
|
|
6057
|
-
const i = { ...
|
|
6055
|
+
let s = ie(d);
|
|
6056
|
+
s.shape = s.shape, s.perimeter = s.perimeter, n.background.indexOf("/files") > -1 && (n.background = ""), Number(n.borderValue) === 0 && (n.stroke = "transparent"), u = `shape=${s.shape};perimeter=${s.perimeter};fillColor=${n.background || "#D1E7FF"};strokeColor=${n.stroke || "#000000"};strokeWidth=${n.borderValue || 0}`, s.direction && (u += `;direction=${s.direction}`);
|
|
6057
|
+
const i = { ...s, ...n };
|
|
6058
6058
|
a.value.style = i, T(a.value.style, a.value.data);
|
|
6059
6059
|
}
|
|
6060
6060
|
return u;
|
|
@@ -6062,8 +6062,8 @@ function je(t) {
|
|
|
6062
6062
|
function ie(a) {
|
|
6063
6063
|
const n = {};
|
|
6064
6064
|
return a.split(";").filter((d) => d.trim() !== "").forEach((d) => {
|
|
6065
|
-
const [
|
|
6066
|
-
|
|
6065
|
+
const [s, i] = d.split("=");
|
|
6066
|
+
s && i !== void 0 && (n[s.trim()] = i.trim());
|
|
6067
6067
|
}), n;
|
|
6068
6068
|
}
|
|
6069
6069
|
function oe(a) {
|
|
@@ -6072,7 +6072,7 @@ function je(t) {
|
|
|
6072
6072
|
e.addImgVertex = (a) => {
|
|
6073
6073
|
let n = e.graph;
|
|
6074
6074
|
const u = n.getModel();
|
|
6075
|
-
let d = n.getDefaultParent(),
|
|
6075
|
+
let d = n.getDefaultParent(), s = [];
|
|
6076
6076
|
u.beginUpdate();
|
|
6077
6077
|
try {
|
|
6078
6078
|
a.forEach((i) => {
|
|
@@ -6085,8 +6085,8 @@ function je(t) {
|
|
|
6085
6085
|
style: w,
|
|
6086
6086
|
name: i ? i.displayName : i.getAttribute("label"),
|
|
6087
6087
|
realWh: M
|
|
6088
|
-
},
|
|
6089
|
-
}), n.setSelectionCells(
|
|
6088
|
+
}, s.push(V);
|
|
6089
|
+
}), n.setSelectionCells(s);
|
|
6090
6090
|
} finally {
|
|
6091
6091
|
u.endUpdate();
|
|
6092
6092
|
}
|
|
@@ -6115,8 +6115,8 @@ function je(t) {
|
|
|
6115
6115
|
mxGraph.prototype.insertEdge = function(y, c, f, b, S, w) {
|
|
6116
6116
|
return w === null && (w = ""), n.apply(this, arguments);
|
|
6117
6117
|
};
|
|
6118
|
-
let u = e.graph, d = u.getDefaultParent(),
|
|
6119
|
-
|
|
6118
|
+
let u = e.graph, d = u.getDefaultParent(), s = u.getModel(), i = [];
|
|
6119
|
+
s.beginUpdate();
|
|
6120
6120
|
try {
|
|
6121
6121
|
for (let y = 0; y < a.length; y++) {
|
|
6122
6122
|
const c = a[y], { evt: f = null, data: b = null, pt: S = { x: 50, y: 50 }, style: w, w: E = 30, h: L = 100, iconName: O = "icon-general-icon" } = c;
|
|
@@ -6124,8 +6124,8 @@ function je(t) {
|
|
|
6124
6124
|
f && (M = u.getPointForEvent(f));
|
|
6125
6125
|
let B = ue(), F = u.insertEdge(d, null, "", null, null, w.perimeter + `;strokeWidth=${w.strokeWidth || 1};strokeColor=${w.strokeColor || "#333333"}`);
|
|
6126
6126
|
F.id = B;
|
|
6127
|
-
let V = new mxGeometry(), { startX: H, startY: W, endX: q, endY:
|
|
6128
|
-
V.setTerminalPoint(new mxPoint(H, W), !0), V.setTerminalPoint(new mxPoint(q,
|
|
6127
|
+
let V = new mxGeometry(), { startX: H, startY: W, endX: q, endY: K } = ze(M, E, L);
|
|
6128
|
+
V.setTerminalPoint(new mxPoint(H, W), !0), V.setTerminalPoint(new mxPoint(q, K), !1), F.setGeometry(V), F.model = "yes", F.type = "edge", F.iconName = O, F.value = {
|
|
6129
6129
|
data: { ...b },
|
|
6130
6130
|
//存储对象
|
|
6131
6131
|
style: { ...w }
|
|
@@ -6136,15 +6136,15 @@ function je(t) {
|
|
|
6136
6136
|
}
|
|
6137
6137
|
u.setSelectionCells(i);
|
|
6138
6138
|
} finally {
|
|
6139
|
-
|
|
6139
|
+
s.endUpdate();
|
|
6140
6140
|
}
|
|
6141
6141
|
}
|
|
6142
6142
|
function fe(a) {
|
|
6143
6143
|
let n = e.graph, u = n.getModel(), d = [];
|
|
6144
6144
|
u.beginUpdate();
|
|
6145
6145
|
try {
|
|
6146
|
-
for (let
|
|
6147
|
-
const i = a[
|
|
6146
|
+
for (let s = 0; s < a.length; s++) {
|
|
6147
|
+
const i = a[s], { evt: y = null, data: c = null, pt: f = { x: 50, y: 50 }, style: b, w: S = 100, h: w = 30, type: E, tmpType: L, codeType: O, iconName: M = "icon-general-icon", realType: B } = i;
|
|
6148
6148
|
let F = S, V = w, H = f;
|
|
6149
6149
|
y && (H = n.getPointForEvent(y)), b.layout && (F = b.layout.width, V = b.layout.height);
|
|
6150
6150
|
let W = {
|
|
@@ -6158,9 +6158,9 @@ function je(t) {
|
|
|
6158
6158
|
se.value = W;
|
|
6159
6159
|
}
|
|
6160
6160
|
b.layout = W;
|
|
6161
|
-
let
|
|
6161
|
+
let K = n.getDefaultParent();
|
|
6162
6162
|
ce(n, null);
|
|
6163
|
-
let ne = R(b), re = ue(), Y = n.insertVertex(
|
|
6163
|
+
let ne = R(b), re = ue(), Y = n.insertVertex(K, re, b.text || "", H.x, H.y, F, V, ne);
|
|
6164
6164
|
Y.crtype = "creatComp", Y.cmp = L, Y.codeType = O, Y.type = E, Y.realType = B, Y.model = "yes", Y.name = b.text || "", Y.iconName = M, Y.style = ne, Y.value = {
|
|
6165
6165
|
data: c,
|
|
6166
6166
|
//存储对象
|
|
@@ -6179,8 +6179,8 @@ function je(t) {
|
|
|
6179
6179
|
let n = e.graph, u = n.getModel(), d = [];
|
|
6180
6180
|
u.beginUpdate();
|
|
6181
6181
|
try {
|
|
6182
|
-
for (let
|
|
6183
|
-
const i = a[
|
|
6182
|
+
for (let s = 0; s < a.length; s++) {
|
|
6183
|
+
const i = a[s], { evt: y = null, data: c = null, pt: f = { x: 50, y: 50 }, style: b, w: S = 100, h: w = 20, iconName: E = "iconfont icon-general-icon", realType: L, from: O } = i;
|
|
6184
6184
|
let M = f;
|
|
6185
6185
|
n || (n = e.graph), y && (M = n.getPointForEvent(y));
|
|
6186
6186
|
let B = n.getDefaultParent(), F = n.getModel(), V = {
|
|
@@ -6195,14 +6195,14 @@ function je(t) {
|
|
|
6195
6195
|
}
|
|
6196
6196
|
let W = R(b);
|
|
6197
6197
|
b.gtype == "rect" && (Number(b.borderValue) === 0 && (b.stroke = "transparent"), W = b.perimeter + `;fillColor=${b.background || "transparent"};strokeColor=${b.stroke || "#333333"};strokeWidth=${b.borderWidth || 0}`);
|
|
6198
|
-
let q = ue(),
|
|
6199
|
-
b.gtype == "rect" ?
|
|
6198
|
+
let q = ue(), K = n.insertVertex(B, q, b.text || "", M.x, M.y, S, w, W);
|
|
6199
|
+
b.gtype == "rect" ? K.type = "rect" : K.type = "vertex", K.model = "yes", K.name = b.text || "", K.iconName = E, K.value = {
|
|
6200
6200
|
data: { ...c },
|
|
6201
6201
|
//存储对象
|
|
6202
6202
|
style: { ...b }
|
|
6203
6203
|
//存储样式对象
|
|
6204
|
-
},
|
|
6205
|
-
cells: [
|
|
6204
|
+
}, K.from = O || "other", K.realType = L, K.style = W, d.push(K), n.fireEvent(new mxEventObject(mxEvent.SELECTION_CHANGED, {
|
|
6205
|
+
cells: [K]
|
|
6206
6206
|
}));
|
|
6207
6207
|
}
|
|
6208
6208
|
n.setSelectionCells(d);
|
|
@@ -6211,9 +6211,9 @@ function je(t) {
|
|
|
6211
6211
|
}
|
|
6212
6212
|
}
|
|
6213
6213
|
e.addVertex = ({ graph: a, options: n = {} }) => new Promise((u, d) => {
|
|
6214
|
-
const { evt:
|
|
6214
|
+
const { evt: s = null, data: i = null, pt: y = { x: 50, y: 50 }, style: c, w: f = 100, h: b = 20, iconName: S = "iconfont icon-general-icon", realType: w, from: E } = n;
|
|
6215
6215
|
let L = y;
|
|
6216
|
-
a || (a = e.graph),
|
|
6216
|
+
a || (a = e.graph), s && (L = a.getPointForEvent(s));
|
|
6217
6217
|
let O = a.getDefaultParent(), M = a.getModel(), B = {
|
|
6218
6218
|
width: f,
|
|
6219
6219
|
height: b,
|
|
@@ -6242,7 +6242,7 @@ function je(t) {
|
|
|
6242
6242
|
}
|
|
6243
6243
|
});
|
|
6244
6244
|
function ze(a, n, u) {
|
|
6245
|
-
const
|
|
6245
|
+
const s = -10 * Math.PI / 180, i = Math.cos(s), y = Math.sin(s), c = u / 2, f = n / 2, S = [
|
|
6246
6246
|
{ x: -c, y: -f },
|
|
6247
6247
|
// V1 左上
|
|
6248
6248
|
{ x: c, y: -f },
|
|
@@ -6260,9 +6260,9 @@ function je(t) {
|
|
|
6260
6260
|
e.addEdge = ({ graph: a, options: n = {} }) => {
|
|
6261
6261
|
e.firstFlag = !0;
|
|
6262
6262
|
const u = mxGraph.prototype.insertEdge;
|
|
6263
|
-
return mxGraph.prototype.insertEdge = function(d,
|
|
6263
|
+
return mxGraph.prototype.insertEdge = function(d, s, i, y, c, f) {
|
|
6264
6264
|
return f === null && (f = ""), u.apply(this, arguments);
|
|
6265
|
-
}, new Promise((d,
|
|
6265
|
+
}, new Promise((d, s) => {
|
|
6266
6266
|
const { evt: i = null, data: y = null, pt: c = { x: 50, y: 50 }, style: f, w: b = 30, h: S = 100, iconName: w = "icon-general-icon" } = n;
|
|
6267
6267
|
let E = c;
|
|
6268
6268
|
a || (a = e.graph), i && (E = a.getPointForEvent(i));
|
|
@@ -6285,17 +6285,17 @@ function je(t) {
|
|
|
6285
6285
|
}
|
|
6286
6286
|
});
|
|
6287
6287
|
}, e.createCustomComponent = ({ graph: a, options: n = {} }) => new Promise((u, d) => {
|
|
6288
|
-
const { evt:
|
|
6288
|
+
const { evt: s = null, data: i = null, pt: y = { x: 50, y: 50 }, id: c = null, style: f, w: b = 100, h: S = 30, type: w, tmpType: E, codeType: L, crtype: O = "creatComp", other: M = {}, iconName: B = "icon-general-icon", realType: F } = n;
|
|
6289
6289
|
let V = b, H = S, W = y;
|
|
6290
|
-
a || (a = e.graph),
|
|
6290
|
+
a || (a = e.graph), s && (W = a.getPointForEvent(s)), f.layout && (V = f.layout.width, H = f.layout.height);
|
|
6291
6291
|
let q = {
|
|
6292
6292
|
width: V,
|
|
6293
6293
|
height: H,
|
|
6294
6294
|
x: W.x,
|
|
6295
6295
|
y: W.y
|
|
6296
|
-
},
|
|
6297
|
-
if (
|
|
6298
|
-
let Y =
|
|
6296
|
+
}, K = i.children;
|
|
6297
|
+
if (K && K.length > 0) {
|
|
6298
|
+
let Y = K.find((se) => se.key == "layout");
|
|
6299
6299
|
Y.value = q;
|
|
6300
6300
|
}
|
|
6301
6301
|
f.layout = q;
|
|
@@ -6320,8 +6320,8 @@ function je(t) {
|
|
|
6320
6320
|
}, e.fromXmlToView = (a) => {
|
|
6321
6321
|
let n = e.graph;
|
|
6322
6322
|
return new Promise((u, d) => {
|
|
6323
|
-
let
|
|
6324
|
-
|
|
6323
|
+
let s = new mxFastOrganicLayout(n);
|
|
6324
|
+
s.forceConstant = 140;
|
|
6325
6325
|
const i = n.getStylesheet().getDefaultVertexStyle();
|
|
6326
6326
|
i.fill = "none", i[mxConstants.STYLE_STROKE] = "none", n.getModel().beginUpdate();
|
|
6327
6327
|
try {
|
|
@@ -6332,7 +6332,7 @@ function je(t) {
|
|
|
6332
6332
|
});
|
|
6333
6333
|
}, e.main = (a) => {
|
|
6334
6334
|
let { container: n, xml: u } = a;
|
|
6335
|
-
return new Promise((d,
|
|
6335
|
+
return new Promise((d, s) => {
|
|
6336
6336
|
if (!mxClient.isBrowserSupported())
|
|
6337
6337
|
mxUtils.error("Browser is not supported!", 200, !1);
|
|
6338
6338
|
else {
|
|
@@ -6383,30 +6383,30 @@ function je(t) {
|
|
|
6383
6383
|
function pe(a) {
|
|
6384
6384
|
let n = a.value.data;
|
|
6385
6385
|
if (n) {
|
|
6386
|
-
let u = n.treeData || [], d = [],
|
|
6386
|
+
let u = n.treeData || [], d = [], s = [];
|
|
6387
6387
|
return u.forEach((i) => {
|
|
6388
6388
|
let y = i.children || [], c = y.find((f) => f.key == "hyperlink" && f.value != "null");
|
|
6389
|
-
c && d.push(c), i.title == "PopupBinding" &&
|
|
6389
|
+
c && d.push(c), i.title == "PopupBinding" && s.push(y);
|
|
6390
6390
|
}), {
|
|
6391
6391
|
url: d && d.length > 0 ? d[0].value : "",
|
|
6392
|
-
pup:
|
|
6392
|
+
pup: s
|
|
6393
6393
|
};
|
|
6394
6394
|
}
|
|
6395
6395
|
return null;
|
|
6396
6396
|
}
|
|
6397
|
-
e.addMask = (a, n, u, d,
|
|
6397
|
+
e.addMask = (a, n, u, d, s) => {
|
|
6398
6398
|
let i = l(a.container, "transparentRect");
|
|
6399
6399
|
if (i && i.length > 0)
|
|
6400
6400
|
for (let y = 0; y < i.length; y++) {
|
|
6401
6401
|
let c = i[y];
|
|
6402
|
-
c && (c.style.top = u + "px", c.style.left = n + "px", c.style.width = d + "px", c.style.height =
|
|
6402
|
+
c && (c.style.top = u + "px", c.style.left = n + "px", c.style.width = d + "px", c.style.height = s + "px", c.style.zIndex = "20", e.preview || (c.classList.remove("is-block"), c.classList.add("is-hidden")));
|
|
6403
6403
|
}
|
|
6404
6404
|
}, e.initCanvas = (a) => {
|
|
6405
6405
|
const n = e.graph;
|
|
6406
6406
|
return new Promise((u, d) => {
|
|
6407
|
-
let
|
|
6407
|
+
let s = n.getModel();
|
|
6408
6408
|
const i = n.getDefaultParent();
|
|
6409
|
-
|
|
6409
|
+
s.beginUpdate();
|
|
6410
6410
|
try {
|
|
6411
6411
|
const y = n.insertVertex(
|
|
6412
6412
|
i,
|
|
@@ -6437,7 +6437,7 @@ function je(t) {
|
|
|
6437
6437
|
e.changePageSize(a), e.undoMng && e.clearUndo();
|
|
6438
6438
|
}, 10), u();
|
|
6439
6439
|
} finally {
|
|
6440
|
-
|
|
6440
|
+
s.endUpdate();
|
|
6441
6441
|
}
|
|
6442
6442
|
});
|
|
6443
6443
|
}, e.changeRotationHandleStyle = (a) => {
|
|
@@ -6445,13 +6445,13 @@ function je(t) {
|
|
|
6445
6445
|
}, e.testPosition = () => {
|
|
6446
6446
|
let a = e.graph, n = null, u = e.parent;
|
|
6447
6447
|
u && (n = u.value ? u.value.style : null);
|
|
6448
|
-
let { x: d, y:
|
|
6449
|
-
n.horizontalAlign === "end" && (i = d - 2), n.verticalAlign === "end" && (y =
|
|
6448
|
+
let { x: d, y: s } = ke(n, a.container), i = d, y = s;
|
|
6449
|
+
n.horizontalAlign === "end" && (i = d - 2), n.verticalAlign === "end" && (y = s - 2), e.addMask(a, i, y, n.width, n.height), a.getView().setTranslate(i, y);
|
|
6450
6450
|
}, e.getTranslate = (a) => {
|
|
6451
6451
|
let n = e.graph;
|
|
6452
6452
|
const u = a.value ? a.value.style : null;
|
|
6453
|
-
let { x: d, y:
|
|
6454
|
-
return { x: d, y:
|
|
6453
|
+
let { x: d, y: s } = ke(u, n.container);
|
|
6454
|
+
return { x: d, y: s };
|
|
6455
6455
|
}, e.getFloatingPosition = (a) => {
|
|
6456
6456
|
let n = e.graph;
|
|
6457
6457
|
if (!a) {
|
|
@@ -6469,8 +6469,8 @@ function je(t) {
|
|
|
6469
6469
|
for (let S = 0; S < b.length; S++) {
|
|
6470
6470
|
const w = b[S];
|
|
6471
6471
|
if (w) {
|
|
6472
|
-
var
|
|
6473
|
-
w.style.position = "absolute", w.style.width =
|
|
6472
|
+
var s = f.getGeometry();
|
|
6473
|
+
w.style.position = "absolute", w.style.width = s.width + "px", w.style.height = s.height + "px", w.style.left = s.x + i + "px", w.style.top = s.y + y + "px";
|
|
6474
6474
|
}
|
|
6475
6475
|
}
|
|
6476
6476
|
}
|
|
@@ -6490,10 +6490,10 @@ function je(t) {
|
|
|
6490
6490
|
try {
|
|
6491
6491
|
const d = e.parent;
|
|
6492
6492
|
if (d) {
|
|
6493
|
-
let
|
|
6494
|
-
if (
|
|
6493
|
+
let s = n.getCellGeometry(d);
|
|
6494
|
+
if (s) {
|
|
6495
6495
|
let { x: i, y } = ke(a, n.container);
|
|
6496
|
-
|
|
6496
|
+
s.width = a.width, s.height = a.height, u.setGeometry(d, s);
|
|
6497
6497
|
let c = n.container.querySelector("canvas");
|
|
6498
6498
|
if (a.background)
|
|
6499
6499
|
if (a.background.indexOf("files/") > -1) {
|
|
@@ -6522,7 +6522,7 @@ function je(t) {
|
|
|
6522
6522
|
}
|
|
6523
6523
|
n.scrollCellToVisible(d, !1), e.parent = d, n.refresh(d);
|
|
6524
6524
|
}
|
|
6525
|
-
u.setBounds = function(
|
|
6525
|
+
u.setBounds = function(s) {
|
|
6526
6526
|
return new mxRectangle(0, 0, a.width, a.height);
|
|
6527
6527
|
};
|
|
6528
6528
|
} finally {
|
|
@@ -6533,9 +6533,9 @@ function je(t) {
|
|
|
6533
6533
|
function Ne(a) {
|
|
6534
6534
|
a.addListener(mxEvent.CLICK, function(n, u) {
|
|
6535
6535
|
a.container.focus();
|
|
6536
|
-
const
|
|
6537
|
-
if (
|
|
6538
|
-
return t.handelEvent({ key: "click", evt: u, val:
|
|
6536
|
+
const s = u.getProperty("cell");
|
|
6537
|
+
if (s)
|
|
6538
|
+
return t.handelEvent({ key: "click", evt: u, val: s }), !1;
|
|
6539
6539
|
});
|
|
6540
6540
|
}
|
|
6541
6541
|
function Ye(a) {
|
|
@@ -6551,24 +6551,24 @@ function je(t) {
|
|
|
6551
6551
|
};
|
|
6552
6552
|
}
|
|
6553
6553
|
function qe(a, n, u) {
|
|
6554
|
-
let d = a.getModel(),
|
|
6554
|
+
let d = a.getModel(), s = function(i, y) {
|
|
6555
6555
|
n.undoableEditHappened(y.getProperty("edit"));
|
|
6556
6556
|
};
|
|
6557
|
-
d.addListener(mxEvent.UNDO,
|
|
6557
|
+
d.addListener(mxEvent.UNDO, s), a.getView().addListener(mxEvent.UNDO, s);
|
|
6558
6558
|
}
|
|
6559
|
-
e.addCode = ({ code: a, pt: n, style: u, type: d, iconCls:
|
|
6559
|
+
e.addCode = ({ code: a, pt: n, style: u, type: d, iconCls: s }) => {
|
|
6560
6560
|
let i = e.graph;
|
|
6561
|
-
Be(a, i, { pt: n, style: u, me: e, type: d, iconCls:
|
|
6562
|
-
}, e.addEvent = ({ code: a, pt: n, style: u, type: d, iconCls:
|
|
6561
|
+
Be(a, i, { pt: n, style: u, me: e, type: d, iconCls: s }, t);
|
|
6562
|
+
}, e.addEvent = ({ code: a, pt: n, style: u, type: d, iconCls: s }) => {
|
|
6563
6563
|
let i = e.graph;
|
|
6564
|
-
Be(a, i, { pt: n, style: u, me: e, type: d, iconCls:
|
|
6564
|
+
Be(a, i, { pt: n, style: u, me: e, type: d, iconCls: s }, t);
|
|
6565
6565
|
};
|
|
6566
6566
|
function Xe(a) {
|
|
6567
6567
|
a.addListener(mxEvent.RESIZE_CELLS, function(n, u) {
|
|
6568
|
-
const d = u.getProperty("cells"),
|
|
6568
|
+
const d = u.getProperty("cells"), s = u.getProperty("bounds"), i = u.getProperty("previous"), y = a.getSelectionCells();
|
|
6569
6569
|
d.forEach((c) => {
|
|
6570
6570
|
if (a.getChildCells(c), a.getCellGeometry(c)) {
|
|
6571
|
-
const b = parseFloat(
|
|
6571
|
+
const b = parseFloat(s[0].width / i[0].width), S = parseFloat(s[0].height / i[0].height);
|
|
6572
6572
|
y.forEach((w) => {
|
|
6573
6573
|
if (w.id != c.id) {
|
|
6574
6574
|
const L = a.getCellGeometry(w).clone();
|
|
@@ -6590,7 +6590,7 @@ function je(t) {
|
|
|
6590
6590
|
}
|
|
6591
6591
|
function Ze(a, n, u) {
|
|
6592
6592
|
mxEvent.consume(a);
|
|
6593
|
-
const d = n.getView().getScale(),
|
|
6593
|
+
const d = n.getView().getScale(), s = u ? 1.1 : 1 / 1.1, i = d * s;
|
|
6594
6594
|
if (i > 3 || i < 0.1) return;
|
|
6595
6595
|
const y = n.container, c = y.offsetWidth, f = y.offsetHeight, b = c / 2, S = f / 2;
|
|
6596
6596
|
n.getModel().beginUpdate();
|
|
@@ -6607,7 +6607,7 @@ function je(t) {
|
|
|
6607
6607
|
}
|
|
6608
6608
|
}
|
|
6609
6609
|
function Je(a, n) {
|
|
6610
|
-
n.popupMenuHandler.autoExpand = !0, n.popupMenuHandler.factoryMethod = function(u, d,
|
|
6610
|
+
n.popupMenuHandler.autoExpand = !0, n.popupMenuHandler.factoryMethod = function(u, d, s) {
|
|
6611
6611
|
if (e.preview)
|
|
6612
6612
|
return;
|
|
6613
6613
|
let i = mxClipboard.cells;
|
|
@@ -6618,8 +6618,8 @@ function je(t) {
|
|
|
6618
6618
|
let b = null, S = null;
|
|
6619
6619
|
f.children && f.children.length > 0 ? (b = null, S = f.children) : b = function() {
|
|
6620
6620
|
if (f.code) {
|
|
6621
|
-
let E = n.getPointForEvent(
|
|
6622
|
-
t.contextmenus(
|
|
6621
|
+
let E = n.getPointForEvent(s);
|
|
6622
|
+
t.contextmenus(s, {
|
|
6623
6623
|
title: f.title,
|
|
6624
6624
|
code: f.code || "",
|
|
6625
6625
|
type: f.type,
|
|
@@ -6633,8 +6633,8 @@ function je(t) {
|
|
|
6633
6633
|
S && S.forEach((E) => {
|
|
6634
6634
|
u.addItem(E.title, E.image, function() {
|
|
6635
6635
|
if (E.code) {
|
|
6636
|
-
let L = n.getPointForEvent(
|
|
6637
|
-
t.contextmenus(
|
|
6636
|
+
let L = n.getPointForEvent(s);
|
|
6637
|
+
t.contextmenus(s, {
|
|
6638
6638
|
title: E.title,
|
|
6639
6639
|
code: E.code || "",
|
|
6640
6640
|
type: E.type,
|
|
@@ -6674,10 +6674,10 @@ const $e = {
|
|
|
6674
6674
|
"/js/mxClient.js"
|
|
6675
6675
|
];
|
|
6676
6676
|
return new Promise((l) => {
|
|
6677
|
-
const
|
|
6677
|
+
const o = document.getElementsByTagName("script");
|
|
6678
6678
|
let r = !1;
|
|
6679
|
-
for (let v = 0; v <
|
|
6680
|
-
|
|
6679
|
+
for (let v = 0; v < o.length; v++)
|
|
6680
|
+
o[v].src.includes("mxClient.js") && (r = !0);
|
|
6681
6681
|
if (r)
|
|
6682
6682
|
return l();
|
|
6683
6683
|
let p = e.map((v) => {
|
|
@@ -6975,9 +6975,13 @@ const $e = {
|
|
|
6975
6975
|
handler(t, e) {
|
|
6976
6976
|
let l = this;
|
|
6977
6977
|
l.yhz && (l.yhz.isPreview(!t), l.$nextTick(() => {
|
|
6978
|
-
t ? (l.keys = Math.random().toString(36).substring(2), l.graph.refresh(), l.scheduleUpdateOverlay()
|
|
6978
|
+
t ? (l.keys = Math.random().toString(36).substring(2), l.graph.refresh(), l.scheduleUpdateOverlay(), l.timeLineMap && l.timeLineMap.length > 0 && l.timeLineMap.forEach((o) => {
|
|
6979
|
+
o.cell.setVisible(!1);
|
|
6980
|
+
})) : (l.timeLineMap && l.timeLineMap.length > 0 && l.timeLineMap.forEach((o) => {
|
|
6981
|
+
o.cell.setVisible(!0);
|
|
6982
|
+
}), l.centeredWindow && l.centeredWindow.forEach((r) => {
|
|
6979
6983
|
r && (r.setVisible(!1), r.destroy());
|
|
6980
|
-
});
|
|
6984
|
+
}));
|
|
6981
6985
|
}));
|
|
6982
6986
|
},
|
|
6983
6987
|
immediate: !0,
|
|
@@ -6986,8 +6990,8 @@ const $e = {
|
|
|
6986
6990
|
},
|
|
6987
6991
|
methods: {
|
|
6988
6992
|
getStyle(t) {
|
|
6989
|
-
let e = this,
|
|
6990
|
-
return e.yhz.scheduleBorder(
|
|
6993
|
+
let e = this, o = t.cell.style || {};
|
|
6994
|
+
return e.yhz.scheduleBorder(o);
|
|
6991
6995
|
},
|
|
6992
6996
|
//隐藏并显示
|
|
6993
6997
|
handleshowAndHide(t, e) {
|
|
@@ -6999,8 +7003,8 @@ const $e = {
|
|
|
6999
7003
|
let t = this;
|
|
7000
7004
|
this.updateRaf && cancelAnimationFrame(this.updateRaf), this.updateRaf = requestAnimationFrame(() => {
|
|
7001
7005
|
t.$nextTick(() => {
|
|
7002
|
-
var l = t.graph.getModel().cells,
|
|
7003
|
-
let r =
|
|
7006
|
+
var l = t.graph.getModel().cells, o = Object.values(l);
|
|
7007
|
+
let r = o.filter((m) => m.crtype == "schedule");
|
|
7004
7008
|
for (let m = 0; m < r.length; m++) {
|
|
7005
7009
|
let p = r[m];
|
|
7006
7010
|
t.graph.view.validateCell(p);
|
|
@@ -7012,8 +7016,8 @@ const $e = {
|
|
|
7012
7016
|
async addTimeLine({ cellAry: t, scheduleCombination: e }) {
|
|
7013
7017
|
let l = this;
|
|
7014
7018
|
l.$nextTick(() => {
|
|
7015
|
-
for (let
|
|
7016
|
-
let r = t[
|
|
7019
|
+
for (let o = 0; o < t.length; o++) {
|
|
7020
|
+
let r = t[o], m = {
|
|
7017
7021
|
id: r.id,
|
|
7018
7022
|
cell: r,
|
|
7019
7023
|
other: r.other,
|
|
@@ -7118,20 +7122,20 @@ const $e = {
|
|
|
7118
7122
|
let t = this, e = t.$refs.geEditor;
|
|
7119
7123
|
const l = new je(t);
|
|
7120
7124
|
if (!t.graph) {
|
|
7121
|
-
let
|
|
7125
|
+
let o = await l.init({
|
|
7122
7126
|
container: e,
|
|
7123
7127
|
menus: t.menus,
|
|
7124
7128
|
pageShortcuts: t.pageShortcuts
|
|
7125
7129
|
});
|
|
7126
|
-
t.graph =
|
|
7130
|
+
t.graph = o, t.delCell(o), t.yhz = l, t.$emit("handelEvent", { key: "init", mygraph: o, yhz: l }), setTimeout(() => {
|
|
7127
7131
|
l.isPreview(!t.isPreview);
|
|
7128
7132
|
}, 0);
|
|
7129
7133
|
}
|
|
7130
7134
|
},
|
|
7131
7135
|
delCell(t) {
|
|
7132
7136
|
let e = this;
|
|
7133
|
-
t.addListener(mxEvent.DELETE_CELLS, (l,
|
|
7134
|
-
const r =
|
|
7137
|
+
t.addListener(mxEvent.DELETE_CELLS, (l, o) => {
|
|
7138
|
+
const r = o.properties.cells;
|
|
7135
7139
|
let m = [];
|
|
7136
7140
|
r && r.length > 0 && (r.forEach((p) => {
|
|
7137
7141
|
m.push(p.id);
|
|
@@ -7155,7 +7159,7 @@ const $e = {
|
|
|
7155
7159
|
l.centeredWindow && l.centeredWindow.forEach((m) => {
|
|
7156
7160
|
m && (m.setVisible(!1), m.destroy());
|
|
7157
7161
|
});
|
|
7158
|
-
let
|
|
7162
|
+
let o = [];
|
|
7159
7163
|
t.forEach((r, m) => {
|
|
7160
7164
|
var p = document.createElement("div");
|
|
7161
7165
|
if (r.type === "img") {
|
|
@@ -7191,28 +7195,30 @@ const $e = {
|
|
|
7191
7195
|
"mxWindowTitle"
|
|
7192
7196
|
);
|
|
7193
7197
|
U.setClosable(!0), U.setMaximizable(!0), U.setScrollable(!0), U.setResizable(!0), U.setVisible(e), U.constrainWithinViewport = !0, U.addListener(mxEvent.CLOSE, function(I, R) {
|
|
7194
|
-
l.isShowPup = !1,
|
|
7198
|
+
l.isShowPup = !1, C && C.length > 0 && C.forEach((G) => {
|
|
7199
|
+
document.body.removeChild(G);
|
|
7200
|
+
}), z.style.display = "none";
|
|
7195
7201
|
}), U.addListener(mxEvent.MOVE, function(I, R) {
|
|
7196
|
-
var
|
|
7197
|
-
|
|
7198
|
-
}), U.div && C.length === 0 && (U.div.style.zIndex = 2e3 + m, z.className = "mx-window-mask", z.style.zIndex = 30 + m, document.body.appendChild(z), z.style.display = "block"),
|
|
7199
|
-
}), l.centeredWindow =
|
|
7202
|
+
var G = U.getX(), $ = U.getY(), T = U.getElement().offsetWidth, Z = U.getElement().offsetHeight, te = document.documentElement.clientWidth, ie = document.documentElement.clientHeight, oe = 0, ce = 0, ye = te - T, fe = ie - Z;
|
|
7203
|
+
G = Math.max(oe, Math.min(G, ye)), $ = Math.max(ce, Math.min($, fe)), U.setLocation(G, $);
|
|
7204
|
+
}), U.div && C.length === 0 && (U.div.style.zIndex = 2e3 + m, z.className = "mx-window-mask", z.style.zIndex = 30 + m, document.body.appendChild(z), z.style.display = "block"), o.push(U);
|
|
7205
|
+
}), l.centeredWindow = o, l.wndAry = o;
|
|
7200
7206
|
}
|
|
7201
7207
|
},
|
|
7202
7208
|
getWindowInfo() {
|
|
7203
7209
|
let t = this, e = t.wndAry;
|
|
7204
|
-
e && e.length > 0 && e.forEach((l,
|
|
7210
|
+
e && e.length > 0 && e.forEach((l, o) => {
|
|
7205
7211
|
if (l) {
|
|
7206
|
-
let r = t.pupAry[
|
|
7212
|
+
let r = t.pupAry[o];
|
|
7207
7213
|
r && t.openPupop([r], l.isVisible());
|
|
7208
7214
|
}
|
|
7209
7215
|
});
|
|
7210
7216
|
},
|
|
7211
7217
|
debounce(t, e = 200) {
|
|
7212
7218
|
let l = null;
|
|
7213
|
-
return function(...
|
|
7219
|
+
return function(...o) {
|
|
7214
7220
|
clearTimeout(l), l = setTimeout(() => {
|
|
7215
|
-
t.apply(this,
|
|
7221
|
+
t.apply(this, o);
|
|
7216
7222
|
}, e);
|
|
7217
7223
|
};
|
|
7218
7224
|
},
|
|
@@ -7244,7 +7250,7 @@ const $e = {
|
|
|
7244
7250
|
key: 0,
|
|
7245
7251
|
class: "transparentRect"
|
|
7246
7252
|
}, Ll = ["id"];
|
|
7247
|
-
function Pl(t, e, l,
|
|
7253
|
+
function Pl(t, e, l, o, r, m) {
|
|
7248
7254
|
return P(), D("div", {
|
|
7249
7255
|
class: J(["main-gd", { "show-scroll": l.isPreview }]),
|
|
7250
7256
|
ref: "mainGd"
|
|
@@ -7327,8 +7333,8 @@ const jl = /* @__PURE__ */ ae(zl, [["render", Pl]]), Tl = {
|
|
|
7327
7333
|
let t = this;
|
|
7328
7334
|
this.updateRaf && cancelAnimationFrame(this.updateRaf), this.updateRaf = requestAnimationFrame(() => {
|
|
7329
7335
|
t.$nextTick(() => {
|
|
7330
|
-
var l = t.graph.getModel().cells,
|
|
7331
|
-
let r =
|
|
7336
|
+
var l = t.graph.getModel().cells, o = Object.values(l);
|
|
7337
|
+
let r = o.filter((m) => m.crtype == "schedule");
|
|
7332
7338
|
for (let m = 0; m < r.length; m++) {
|
|
7333
7339
|
let p = r[m];
|
|
7334
7340
|
t.graph.view.validateCell(p);
|
|
@@ -7340,7 +7346,7 @@ const jl = /* @__PURE__ */ ae(zl, [["render", Pl]]), Tl = {
|
|
|
7340
7346
|
async addTimeLine({ cellAry: t, scheduleCombination: e }) {
|
|
7341
7347
|
let l = this;
|
|
7342
7348
|
l.$nextTick(() => {
|
|
7343
|
-
let
|
|
7349
|
+
let o = {};
|
|
7344
7350
|
for (let r = 0; r < t.length; r++) {
|
|
7345
7351
|
let m = t[r], p = {
|
|
7346
7352
|
id: m.id,
|
|
@@ -7349,9 +7355,9 @@ const jl = /* @__PURE__ */ ae(zl, [["render", Pl]]), Tl = {
|
|
|
7349
7355
|
compId: m.id,
|
|
7350
7356
|
show: !0
|
|
7351
7357
|
};
|
|
7352
|
-
l.timeLineMap.push(p),
|
|
7358
|
+
l.timeLineMap.push(p), o[m.id] = e;
|
|
7353
7359
|
}
|
|
7354
|
-
l.compMap = Object.freeze(
|
|
7360
|
+
l.compMap = Object.freeze(o), this.$forceUpdate();
|
|
7355
7361
|
});
|
|
7356
7362
|
},
|
|
7357
7363
|
//删除键盘
|
|
@@ -7441,12 +7447,12 @@ const jl = /* @__PURE__ */ ae(zl, [["render", Pl]]), Tl = {
|
|
|
7441
7447
|
let t = this, e = t.$refs.geEditor;
|
|
7442
7448
|
const l = new je(t);
|
|
7443
7449
|
if (!t.graph) {
|
|
7444
|
-
let
|
|
7450
|
+
let o = await l.init({
|
|
7445
7451
|
container: e,
|
|
7446
7452
|
menus: t.menus,
|
|
7447
7453
|
pageShortcuts: t.pageShortcuts
|
|
7448
7454
|
});
|
|
7449
|
-
t.graph =
|
|
7455
|
+
t.graph = o, t.yhz = l, t.$emit("handelEvent", { key: "init", mygraph: o, yhz: l }), setTimeout(() => {
|
|
7450
7456
|
l.isPreview(!t.isPreview);
|
|
7451
7457
|
}, 0);
|
|
7452
7458
|
}
|
|
@@ -7466,7 +7472,7 @@ const jl = /* @__PURE__ */ ae(zl, [["render", Pl]]), Tl = {
|
|
|
7466
7472
|
window.centeredWindow && window.centeredWindow.forEach((m) => {
|
|
7467
7473
|
m && (m.setVisible(!1), m.destroy());
|
|
7468
7474
|
});
|
|
7469
|
-
let
|
|
7475
|
+
let o = [];
|
|
7470
7476
|
t.forEach((r) => {
|
|
7471
7477
|
var m = document.createElement("div");
|
|
7472
7478
|
if (r.type === "img") {
|
|
@@ -7502,10 +7508,10 @@ const jl = /* @__PURE__ */ ae(zl, [["render", Pl]]), Tl = {
|
|
|
7502
7508
|
A.setClosable(!0), A.setMaximizable(!1), A.setResizable(!0), A.setVisible(e), A.constrainWithinViewport = !0, A.addListener(mxEvent.CLOSE, function(z, C) {
|
|
7503
7509
|
l.isShowPup = !1;
|
|
7504
7510
|
}), A.addListener(mxEvent.MOVE, function(z, C) {
|
|
7505
|
-
var U = A.getX(), I = A.getY(), R = A.getElement().offsetWidth,
|
|
7511
|
+
var U = A.getX(), I = A.getY(), R = A.getElement().offsetWidth, G = A.getElement().offsetHeight, $ = document.documentElement.clientWidth, T = document.documentElement.clientHeight, Z = 0, te = 0, ie = $ - R, oe = T - G;
|
|
7506
7512
|
U = Math.max(Z, Math.min(U, ie)), I = Math.max(te, Math.min(I, oe)), A.setLocation(U, I);
|
|
7507
|
-
}),
|
|
7508
|
-
}), window.centeredWindow =
|
|
7513
|
+
}), o.push(A);
|
|
7514
|
+
}), window.centeredWindow = o, l.wndAry = o;
|
|
7509
7515
|
}
|
|
7510
7516
|
}
|
|
7511
7517
|
// 监听
|
|
@@ -7516,7 +7522,7 @@ const jl = /* @__PURE__ */ ae(zl, [["render", Pl]]), Tl = {
|
|
|
7516
7522
|
t.init();
|
|
7517
7523
|
}), t.resizeObserver = new ResizeObserver((e) => {
|
|
7518
7524
|
e.forEach((l) => {
|
|
7519
|
-
const { width:
|
|
7525
|
+
const { width: o, height: r } = l.contentRect;
|
|
7520
7526
|
t.onResize(), t.openPupop(t.pupAry);
|
|
7521
7527
|
});
|
|
7522
7528
|
}), t.resizeObserver.observe(t.$refs.geEditor);
|
|
@@ -7534,7 +7540,7 @@ const jl = /* @__PURE__ */ ae(zl, [["render", Pl]]), Tl = {
|
|
|
7534
7540
|
key: 0,
|
|
7535
7541
|
class: "transparentRect"
|
|
7536
7542
|
}, Fl = ["id"];
|
|
7537
|
-
function Ol(t, e, l,
|
|
7543
|
+
function Ol(t, e, l, o, r, m) {
|
|
7538
7544
|
return P(), D("div", Il, [
|
|
7539
7545
|
le("div", {
|
|
7540
7546
|
class: "main-body",
|