jvs-draw 1.1.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/jvs-draw.es.js +277 -277
- package/dist/jvs-draw.umd.js +4 -4
- package/package.json +1 -1
package/dist/jvs-draw.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { reactive as R0, markRaw as D1, defineComponent as J2, computed as Q, ref as N, watch as M6, resolveComponent as
|
|
1
|
+
import { reactive as R0, markRaw as D1, defineComponent as J2, computed as Q, ref as N, watch as M6, resolveComponent as n6, createElementBlock as R, openBlock as A, normalizeStyle as G2, createElementVNode as g, normalizeClass as $2, Fragment as Y2, renderList as h6, createBlock as m6, withCtx as L2, createCommentVNode as p2, toDisplayString as l6, unref as m2, createVNode as s2, nextTick as _6, withModifiers as F6, onMounted as l1, onUnmounted as w0, withDirectives as X0, vModelText as Y0, mergeModels as Q0, useModel as Z0, createStaticVNode as W0 } from "vue";
|
|
2
2
|
import { defineStore as U0 } from "pinia";
|
|
3
3
|
import { ElMessageBox as G0 } from "element-plus";
|
|
4
4
|
const N0 = (i, e, t, l, a) => [
|
|
@@ -351,16 +351,16 @@ let k6 = (i = 21) => {
|
|
|
351
351
|
e += r4[t[i] & 63];
|
|
352
352
|
return e;
|
|
353
353
|
};
|
|
354
|
-
const z0 = R0({
|
|
354
|
+
const d4 = a6(), z0 = R0({
|
|
355
355
|
showToolbar: !0,
|
|
356
356
|
showBoardName: !0,
|
|
357
357
|
showFooter: !0,
|
|
358
358
|
showPropertiesPanel: !0,
|
|
359
359
|
editable: !1,
|
|
360
360
|
loadFromLocal: !0
|
|
361
|
-
}),
|
|
362
|
-
Object.assign(z0, i);
|
|
363
|
-
},
|
|
361
|
+
}), h4 = (i) => {
|
|
362
|
+
d4.appConfig = Object.assign(z0, i);
|
|
363
|
+
}, a6 = U0("excalidraw", {
|
|
364
364
|
state: () => ({
|
|
365
365
|
// State initialized correctly
|
|
366
366
|
elements: [],
|
|
@@ -1067,16 +1067,16 @@ const z0 = R0({
|
|
|
1067
1067
|
}, 500);
|
|
1068
1068
|
};
|
|
1069
1069
|
window.addEventListener("focus", l), e.click();
|
|
1070
|
-
}),
|
|
1070
|
+
}), p4 = { class: "tool-group" }, u4 = { class: "svg-icon" }, f4 = ["xlink:href"], v4 = ["title"], m4 = { class: "svg-icon" }, g4 = ["xlink:href"], y4 = {
|
|
1071
1071
|
key: 0,
|
|
1072
1072
|
class: "shortcut"
|
|
1073
|
-
},
|
|
1073
|
+
}, x4 = { class: "sub-tools-container" }, b4 = ["onClick"], w4 = { class: "svg-icon" }, q4 = ["xlink:href"], z4 = ["onClick", "title"], k4 = { class: "svg-icon" }, M4 = ["xlink:href"], F4 = {
|
|
1074
1074
|
key: 0,
|
|
1075
1075
|
class: "shortcut"
|
|
1076
|
-
},
|
|
1076
|
+
}, S4 = /* @__PURE__ */ J2({
|
|
1077
1077
|
__name: "Toolbar",
|
|
1078
1078
|
setup(i) {
|
|
1079
|
-
const e =
|
|
1079
|
+
const e = a6(), t = Q(() => e.appState.activeTool), l = Q(() => e.appState.activeToolType), a = N(!1);
|
|
1080
1080
|
M6(() => t.value, (d) => {
|
|
1081
1081
|
d === "shapes" ? a.value = !0 : a.value = !1;
|
|
1082
1082
|
});
|
|
@@ -1136,21 +1136,21 @@ const z0 = R0({
|
|
|
1136
1136
|
e.setLockedTool(!e.appState.lockedTool);
|
|
1137
1137
|
}
|
|
1138
1138
|
return (d, m) => {
|
|
1139
|
-
const p =
|
|
1139
|
+
const p = n6("el-popover");
|
|
1140
1140
|
return A(), R("div", {
|
|
1141
1141
|
class: "toolbar glass",
|
|
1142
1142
|
style: G2({ pointerEvents: c.value ? "none" : "auto" })
|
|
1143
1143
|
}, [
|
|
1144
|
-
g("div",
|
|
1144
|
+
g("div", p4, [
|
|
1145
1145
|
g("div", {
|
|
1146
1146
|
class: $2({ "tool-item": !0, active: n.value }),
|
|
1147
1147
|
onClick: y,
|
|
1148
1148
|
title: "绘制后保持所选工具状态"
|
|
1149
1149
|
}, [
|
|
1150
|
-
(A(), R("svg",
|
|
1150
|
+
(A(), R("svg", u4, [
|
|
1151
1151
|
g("use", {
|
|
1152
1152
|
"xlink:href": `${n.value ? "#icon-zujiansuoding" : "#icon-zujianjiesuo"}`
|
|
1153
|
-
}, null, 8,
|
|
1153
|
+
}, null, 8, f4)
|
|
1154
1154
|
]))
|
|
1155
1155
|
], 2),
|
|
1156
1156
|
(A(), R(Y2, null, h6(s, (M) => (A(), R(Y2, {
|
|
@@ -1173,27 +1173,27 @@ const z0 = R0({
|
|
|
1173
1173
|
class: $2({ "tool-item": !0, active: t.value === M.name }),
|
|
1174
1174
|
title: M.label
|
|
1175
1175
|
}, [
|
|
1176
|
-
(A(), R("svg",
|
|
1176
|
+
(A(), R("svg", m4, [
|
|
1177
1177
|
g("use", {
|
|
1178
1178
|
"xlink:href": `${t.value === M.name ? M.activeIcon : M.icon}`
|
|
1179
|
-
}, null, 8,
|
|
1179
|
+
}, null, 8, g4)
|
|
1180
1180
|
])),
|
|
1181
|
-
M.key ? (A(), R("span",
|
|
1182
|
-
], 10,
|
|
1181
|
+
M.key ? (A(), R("span", y4, l6(M.key), 1)) : p2("", !0)
|
|
1182
|
+
], 10, v4)
|
|
1183
1183
|
]),
|
|
1184
1184
|
default: L2(() => [
|
|
1185
|
-
g("div",
|
|
1185
|
+
g("div", x4, [
|
|
1186
1186
|
(A(!0), R(Y2, null, h6(M.subTools, (k) => (A(), R("div", {
|
|
1187
1187
|
key: k.name,
|
|
1188
1188
|
class: $2(["sub-tool-item", { active: t.value === M.name && l.value === k.name }]),
|
|
1189
1189
|
onClick: (C) => r(k.name, M.name)
|
|
1190
1190
|
}, [
|
|
1191
|
-
(A(), R("svg",
|
|
1191
|
+
(A(), R("svg", w4, [
|
|
1192
1192
|
g("use", {
|
|
1193
1193
|
"xlink:href": `${k.icon}`
|
|
1194
|
-
}, null, 8,
|
|
1194
|
+
}, null, 8, q4)
|
|
1195
1195
|
]))
|
|
1196
|
-
], 10,
|
|
1196
|
+
], 10, b4))), 128))
|
|
1197
1197
|
])
|
|
1198
1198
|
]),
|
|
1199
1199
|
_: 2
|
|
@@ -1204,25 +1204,25 @@ const z0 = R0({
|
|
|
1204
1204
|
title: M.label
|
|
1205
1205
|
}, [
|
|
1206
1206
|
M.name !== "trand" ? (A(), R(Y2, { key: 0 }, [
|
|
1207
|
-
(A(), R("svg",
|
|
1207
|
+
(A(), R("svg", k4, [
|
|
1208
1208
|
g("use", {
|
|
1209
1209
|
"xlink:href": `${t.value === M.name ? M.activeIcon : M.icon}`
|
|
1210
|
-
}, null, 8,
|
|
1210
|
+
}, null, 8, M4)
|
|
1211
1211
|
])),
|
|
1212
|
-
M.key ? (A(), R("span",
|
|
1212
|
+
M.key ? (A(), R("span", F4, l6(M.key), 1)) : p2("", !0)
|
|
1213
1213
|
], 64)) : p2("", !0)
|
|
1214
|
-
], 10,
|
|
1214
|
+
], 10, z4))
|
|
1215
1215
|
], 64))), 64))
|
|
1216
1216
|
])
|
|
1217
1217
|
], 4);
|
|
1218
1218
|
};
|
|
1219
1219
|
}
|
|
1220
|
-
}),
|
|
1220
|
+
}), i6 = (i, e) => {
|
|
1221
1221
|
const t = i.__vccOpts || i;
|
|
1222
1222
|
for (const [l, a] of e)
|
|
1223
1223
|
t[l] = a;
|
|
1224
1224
|
return t;
|
|
1225
|
-
},
|
|
1225
|
+
}, C4 = /* @__PURE__ */ i6(S4, [["__scopeId", "data-v-b6ea5f5c"]]);
|
|
1226
1226
|
function r0(i) {
|
|
1227
1227
|
let e;
|
|
1228
1228
|
if (i > 100 && (i = 100), i < 0 || i > 100)
|
|
@@ -1235,10 +1235,10 @@ function p1(i) {
|
|
|
1235
1235
|
const e = parseInt(i, 16);
|
|
1236
1236
|
return isNaN(e) ? 100 : Math.round(e / 255 * 100);
|
|
1237
1237
|
}
|
|
1238
|
-
const
|
|
1238
|
+
const B4 = { class: "fill-style-box" }, I4 = ["onClick"], E4 = { class: "svg-icon" }, T4 = ["xlink:href"], H4 = /* @__PURE__ */ J2({
|
|
1239
1239
|
__name: "fillStyle",
|
|
1240
1240
|
setup(i) {
|
|
1241
|
-
const e =
|
|
1241
|
+
const e = a6(), t = Q(() => {
|
|
1242
1242
|
const n = l();
|
|
1243
1243
|
return n ? n.fillStyle : e.appState.currentItemFillStyle;
|
|
1244
1244
|
}), l = () => {
|
|
@@ -1268,24 +1268,24 @@ const C4 = { class: "fill-style-box" }, B4 = ["onClick"], I4 = { class: "svg-ico
|
|
|
1268
1268
|
]), s = (n) => {
|
|
1269
1269
|
e.updateSelectedElements({ fillStyle: n });
|
|
1270
1270
|
};
|
|
1271
|
-
return (n, o) => (A(), R("div",
|
|
1271
|
+
return (n, o) => (A(), R("div", B4, [
|
|
1272
1272
|
(A(!0), R(Y2, null, h6(a.value, (c, r) => (A(), R("div", {
|
|
1273
1273
|
key: r,
|
|
1274
1274
|
class: $2(["fill-style-item", { active: t.value === c.value }]),
|
|
1275
1275
|
onClick: (u) => s(c.value)
|
|
1276
1276
|
}, [
|
|
1277
|
-
(A(), R("svg",
|
|
1277
|
+
(A(), R("svg", E4, [
|
|
1278
1278
|
g("use", {
|
|
1279
1279
|
"xlink:href": `#${t.value === c.value ? c.iconActive : c.icon}`
|
|
1280
|
-
}, null, 8,
|
|
1280
|
+
}, null, 8, T4)
|
|
1281
1281
|
]))
|
|
1282
|
-
], 10,
|
|
1282
|
+
], 10, I4))), 128))
|
|
1283
1283
|
]));
|
|
1284
1284
|
}
|
|
1285
|
-
}), M0 = /* @__PURE__ */
|
|
1285
|
+
}), M0 = /* @__PURE__ */ i6(H4, [["__scopeId", "data-v-9356d2e1"]]), L4 = { class: "fill-style-box" }, V4 = ["onClick"], D4 = { class: "svg-icon" }, P4 = ["xlink:href"], A4 = /* @__PURE__ */ J2({
|
|
1286
1286
|
__name: "borderStyle",
|
|
1287
1287
|
setup(i) {
|
|
1288
|
-
const e =
|
|
1288
|
+
const e = a6(), t = Q(() => {
|
|
1289
1289
|
const n = l();
|
|
1290
1290
|
return n ? n.strokeStyle : e.appState.currentItemFillStyle;
|
|
1291
1291
|
}), l = () => {
|
|
@@ -1315,24 +1315,24 @@ const C4 = { class: "fill-style-box" }, B4 = ["onClick"], I4 = { class: "svg-ico
|
|
|
1315
1315
|
]), s = (n) => {
|
|
1316
1316
|
e.updateSelectedElements({ strokeStyle: n });
|
|
1317
1317
|
};
|
|
1318
|
-
return (n, o) => (A(), R("div",
|
|
1318
|
+
return (n, o) => (A(), R("div", L4, [
|
|
1319
1319
|
(A(!0), R(Y2, null, h6(a.value, (c, r) => (A(), R("div", {
|
|
1320
1320
|
key: r,
|
|
1321
1321
|
class: $2(["fill-style-item", { active: t.value === c.value }]),
|
|
1322
1322
|
onClick: (u) => s(c.value)
|
|
1323
1323
|
}, [
|
|
1324
|
-
(A(), R("svg",
|
|
1324
|
+
(A(), R("svg", D4, [
|
|
1325
1325
|
g("use", {
|
|
1326
1326
|
"xlink:href": `#${t.value === c.value ? c.iconActive : c.icon}`
|
|
1327
|
-
}, null, 8,
|
|
1327
|
+
}, null, 8, P4)
|
|
1328
1328
|
]))
|
|
1329
|
-
], 10,
|
|
1329
|
+
], 10, V4))), 128))
|
|
1330
1330
|
]));
|
|
1331
1331
|
}
|
|
1332
|
-
}), F0 = /* @__PURE__ */
|
|
1332
|
+
}), F0 = /* @__PURE__ */ i6(A4, [["__scopeId", "data-v-dcf857c8"]]), _4 = { class: "fill-style-box" }, $4 = ["onClick"], j4 = { class: "svg-icon" }, O4 = ["xlink:href"], R4 = /* @__PURE__ */ J2({
|
|
1333
1333
|
__name: "lineStyle",
|
|
1334
1334
|
setup(i) {
|
|
1335
|
-
const e =
|
|
1335
|
+
const e = a6(), t = Q(() => {
|
|
1336
1336
|
const n = l();
|
|
1337
1337
|
return n ? n.roughness : e.appState.currentItemRoughness;
|
|
1338
1338
|
}), l = () => {
|
|
@@ -1362,24 +1362,24 @@ const C4 = { class: "fill-style-box" }, B4 = ["onClick"], I4 = { class: "svg-ico
|
|
|
1362
1362
|
]), s = (n) => {
|
|
1363
1363
|
e.updateSelectedElements({ roughness: n });
|
|
1364
1364
|
};
|
|
1365
|
-
return (n, o) => (A(), R("div",
|
|
1365
|
+
return (n, o) => (A(), R("div", _4, [
|
|
1366
1366
|
(A(!0), R(Y2, null, h6(a.value, (c, r) => (A(), R("div", {
|
|
1367
1367
|
key: r,
|
|
1368
1368
|
class: $2(["fill-style-item", { active: t.value === c.value }]),
|
|
1369
1369
|
onClick: (u) => s(c.value)
|
|
1370
1370
|
}, [
|
|
1371
|
-
(A(), R("svg",
|
|
1371
|
+
(A(), R("svg", j4, [
|
|
1372
1372
|
g("use", {
|
|
1373
1373
|
"xlink:href": `#${t.value === c.value ? c.iconActive : c.icon}`
|
|
1374
|
-
}, null, 8,
|
|
1374
|
+
}, null, 8, O4)
|
|
1375
1375
|
]))
|
|
1376
|
-
], 10,
|
|
1376
|
+
], 10, $4))), 128))
|
|
1377
1377
|
]));
|
|
1378
1378
|
}
|
|
1379
|
-
}), S0 = /* @__PURE__ */
|
|
1379
|
+
}), S0 = /* @__PURE__ */ i6(R4, [["__scopeId", "data-v-794ba895"]]), X4 = { class: "fill-style-box" }, Y4 = ["onClick"], Q4 = { class: "svg-icon" }, Z4 = ["xlink:href"], W4 = /* @__PURE__ */ J2({
|
|
1380
1380
|
__name: "textStyle",
|
|
1381
1381
|
setup(i) {
|
|
1382
|
-
const e =
|
|
1382
|
+
const e = a6(), t = () => {
|
|
1383
1383
|
const n = Object.keys(e.appState.selectedElementIds);
|
|
1384
1384
|
if (n.length === 0) return null;
|
|
1385
1385
|
const o = n[n.length - 1];
|
|
@@ -1428,24 +1428,24 @@ const C4 = { class: "fill-style-box" }, B4 = ["onClick"], I4 = { class: "svg-ico
|
|
|
1428
1428
|
value: "strikethrough"
|
|
1429
1429
|
}
|
|
1430
1430
|
]);
|
|
1431
|
-
return (n, o) => (A(), R("div",
|
|
1431
|
+
return (n, o) => (A(), R("div", X4, [
|
|
1432
1432
|
(A(!0), R(Y2, null, h6(s.value, (c, r) => (A(), R("div", {
|
|
1433
1433
|
key: r,
|
|
1434
1434
|
class: $2(["fill-style-item", { active: l(c.value) }]),
|
|
1435
1435
|
onClick: (u) => a(c.value)
|
|
1436
1436
|
}, [
|
|
1437
|
-
(A(), R("svg",
|
|
1437
|
+
(A(), R("svg", Q4, [
|
|
1438
1438
|
g("use", {
|
|
1439
1439
|
"xlink:href": `#${l(c.value) ? c.iconActive : c.icon}`
|
|
1440
|
-
}, null, 8,
|
|
1440
|
+
}, null, 8, Z4)
|
|
1441
1441
|
]))
|
|
1442
|
-
], 10,
|
|
1442
|
+
], 10, Y4))), 128))
|
|
1443
1443
|
]));
|
|
1444
1444
|
}
|
|
1445
|
-
}), C0 = /* @__PURE__ */
|
|
1445
|
+
}), C0 = /* @__PURE__ */ i6(W4, [["__scopeId", "data-v-36600f47"]]), U4 = ["onClick"], G4 = { class: "svg-icon" }, N4 = ["xlink:href"], K4 = ["onClick"], J4 = { class: "svg-icon" }, t3 = ["xlink:href"], e3 = /* @__PURE__ */ J2({
|
|
1446
1446
|
__name: "alignStyle",
|
|
1447
1447
|
setup(i) {
|
|
1448
|
-
const e =
|
|
1448
|
+
const e = a6(), t = Q(() => e.appState.activeTool), l = Q(() => Object.keys(e.appState.selectedElementIds)), a = Q(() => l.value.length > 0), s = () => {
|
|
1449
1449
|
if (t.value === "selection") {
|
|
1450
1450
|
if (!a.value) return "none";
|
|
1451
1451
|
const p = l.value[0], M = e.elements.find((k) => k.id === p);
|
|
@@ -1519,29 +1519,29 @@ const C4 = { class: "fill-style-box" }, B4 = ["onClick"], I4 = { class: "svg-ico
|
|
|
1519
1519
|
class: $2(["fill-style-item", { active: o.value === k.value }]),
|
|
1520
1520
|
onClick: (q) => d(k.value)
|
|
1521
1521
|
}, [
|
|
1522
|
-
(A(), R("svg",
|
|
1522
|
+
(A(), R("svg", G4, [
|
|
1523
1523
|
g("use", {
|
|
1524
1524
|
"xlink:href": `#${o.value === k.value ? k.iconActive : k.icon}`
|
|
1525
|
-
}, null, 8,
|
|
1525
|
+
}, null, 8, N4)
|
|
1526
1526
|
]))
|
|
1527
|
-
], 10,
|
|
1527
|
+
], 10, U4))), 128)),
|
|
1528
1528
|
n.value ? (A(!0), R(Y2, { key: 0 }, h6(y.value, (k, C) => (A(), R("div", {
|
|
1529
1529
|
key: C,
|
|
1530
1530
|
class: $2(["fill-style-item", { active: c.value === k.value }]),
|
|
1531
1531
|
onClick: (q) => m(k.value)
|
|
1532
1532
|
}, [
|
|
1533
|
-
(A(), R("svg",
|
|
1533
|
+
(A(), R("svg", J4, [
|
|
1534
1534
|
g("use", {
|
|
1535
1535
|
"xlink:href": `#${c.value === k.value ? k.iconActive : k.icon}`
|
|
1536
|
-
}, null, 8,
|
|
1536
|
+
}, null, 8, t3)
|
|
1537
1537
|
]))
|
|
1538
|
-
], 10,
|
|
1538
|
+
], 10, K4))), 128)) : p2("", !0)
|
|
1539
1539
|
], 2));
|
|
1540
1540
|
}
|
|
1541
|
-
}), B0 = /* @__PURE__ */
|
|
1541
|
+
}), B0 = /* @__PURE__ */ i6(e3, [["__scopeId", "data-v-b408686c"]]), l3 = { class: "fill-style-box" }, a3 = ["onClick"], i3 = { class: "svg-icon" }, n3 = ["xlink:href"], s3 = /* @__PURE__ */ J2({
|
|
1542
1542
|
__name: "arrowStyle",
|
|
1543
1543
|
setup(i) {
|
|
1544
|
-
const e =
|
|
1544
|
+
const e = a6(), t = Q(() => {
|
|
1545
1545
|
const n = l();
|
|
1546
1546
|
return n ? n.arrowType : e.appState.currentItemArrowType;
|
|
1547
1547
|
}), l = () => {
|
|
@@ -1571,54 +1571,54 @@ const C4 = { class: "fill-style-box" }, B4 = ["onClick"], I4 = { class: "svg-ico
|
|
|
1571
1571
|
]), s = (n) => {
|
|
1572
1572
|
e.updateSelectedElements({ arrowType: n });
|
|
1573
1573
|
};
|
|
1574
|
-
return (n, o) => (A(), R("div",
|
|
1574
|
+
return (n, o) => (A(), R("div", l3, [
|
|
1575
1575
|
(A(!0), R(Y2, null, h6(a.value, (c, r) => (A(), R("div", {
|
|
1576
1576
|
key: r,
|
|
1577
1577
|
class: $2(["fill-style-item", { active: t.value === c.value }]),
|
|
1578
1578
|
onClick: (u) => s(c.value)
|
|
1579
1579
|
}, [
|
|
1580
|
-
(A(), R("svg",
|
|
1580
|
+
(A(), R("svg", i3, [
|
|
1581
1581
|
g("use", {
|
|
1582
1582
|
"xlink:href": `#${t.value === c.value ? c.iconActive : c.icon}`
|
|
1583
|
-
}, null, 8,
|
|
1583
|
+
}, null, 8, n3)
|
|
1584
1584
|
]))
|
|
1585
|
-
], 10,
|
|
1585
|
+
], 10, a3))), 128))
|
|
1586
1586
|
]));
|
|
1587
1587
|
}
|
|
1588
|
-
}), I0 = /* @__PURE__ */
|
|
1588
|
+
}), I0 = /* @__PURE__ */ i6(s3, [["__scopeId", "data-v-b56fafad"]]), o3 = { class: "header" }, c3 = { class: "content" }, r3 = { class: "shape-panel-box" }, d3 = { class: "input-box" }, h3 = { class: "input-box" }, p3 = {
|
|
1589
1589
|
key: 0,
|
|
1590
1590
|
class: "input-box"
|
|
1591
|
-
},
|
|
1591
|
+
}, u3 = {
|
|
1592
1592
|
key: 1,
|
|
1593
1593
|
class: "input-box"
|
|
1594
|
-
},
|
|
1594
|
+
}, f3 = {
|
|
1595
1595
|
key: 3,
|
|
1596
1596
|
class: "btn-box"
|
|
1597
|
-
},
|
|
1597
|
+
}, v3 = { class: "svg-icon" }, m3 = ["xlink:href"], g3 = {
|
|
1598
1598
|
key: 0,
|
|
1599
1599
|
class: "roundness-box"
|
|
1600
|
-
},
|
|
1600
|
+
}, y3 = { class: "style-item" }, x3 = {
|
|
1601
1601
|
key: 0,
|
|
1602
1602
|
class: "svg-icon"
|
|
1603
|
-
},
|
|
1603
|
+
}, b3 = { class: "color-text" }, w3 = { class: "style-item" }, q3 = { class: "style-item" }, z3 = { class: "style-item" }, k3 = {
|
|
1604
1604
|
key: 0,
|
|
1605
1605
|
class: "svg-icon"
|
|
1606
|
-
},
|
|
1606
|
+
}, M3 = { class: "color-text" }, F3 = { class: "style-item" }, S3 = { class: "style-item" }, C3 = {
|
|
1607
1607
|
key: 0,
|
|
1608
1608
|
class: "style-item"
|
|
1609
|
-
},
|
|
1609
|
+
}, B3 = { class: "style-item" }, I3 = {
|
|
1610
1610
|
key: 1,
|
|
1611
1611
|
class: "style-item"
|
|
1612
|
-
},
|
|
1612
|
+
}, E3 = { class: "title" }, T3 = { class: "style-item" }, H3 = { class: "style-boxs" }, L3 = { class: "style-boxs-item" }, V3 = { class: "style-boxs-item" }, D3 = { class: "style-item" }, P3 = {
|
|
1613
1613
|
key: 0,
|
|
1614
1614
|
class: "svg-icon"
|
|
1615
|
-
},
|
|
1615
|
+
}, A3 = { class: "color-text" }, _3 = { class: "style-item" }, $3 = {
|
|
1616
1616
|
key: 0,
|
|
1617
1617
|
class: "svg-icon"
|
|
1618
|
-
},
|
|
1618
|
+
}, j3 = { class: "color-text" }, O3 = /* @__PURE__ */ J2({
|
|
1619
1619
|
__name: "PropertiesPanel",
|
|
1620
1620
|
setup(i) {
|
|
1621
|
-
const e =
|
|
1621
|
+
const e = a6(), t = N(), l = N(), a = N(), s = N(), n = N(), o = N(), c = N(), r = N(), u = () => {
|
|
1622
1622
|
e.appState.isPropertiesPanelOpen = !1;
|
|
1623
1623
|
}, y = [12, 14, 16, 18, 20, 24, 28, 32, 36], d = () => {
|
|
1624
1624
|
const E = Object.keys(e.appState.selectedElementIds);
|
|
@@ -1929,13 +1929,13 @@ const C4 = { class: "fill-style-box" }, B4 = ["onClick"], I4 = { class: "svg-ico
|
|
|
1929
1929
|
});
|
|
1930
1930
|
};
|
|
1931
1931
|
return (E, T) => {
|
|
1932
|
-
const g2 =
|
|
1932
|
+
const g2 = n6("el-input-number"), C2 = n6("el-slider"), c2 = n6("jvs-picker-color-v3"), y2 = n6("el-select"), d1 = n6("el-option"), h1 = n6("el-input"), E1 = n6("el-scrollbar");
|
|
1933
1933
|
return m2(e).appState.isPropertiesPanelOpen ? (A(), R("div", {
|
|
1934
1934
|
key: 0,
|
|
1935
1935
|
class: "properties-panel",
|
|
1936
1936
|
style: G2({ pointerEvents: u2.value ? "none" : "auto" })
|
|
1937
1937
|
}, [
|
|
1938
|
-
g("div",
|
|
1938
|
+
g("div", o3, [
|
|
1939
1939
|
T[16] || (T[16] = g("div", null, "形状", -1)),
|
|
1940
1940
|
(A(), R("svg", { onClick: u }, [...T[15] || (T[15] = [
|
|
1941
1941
|
g("use", { "xlink:href": "#jvs-public-danchuangguanbi1" }, null, -1)
|
|
@@ -1943,12 +1943,12 @@ const C4 = { class: "fill-style-box" }, B4 = ["onClick"], I4 = { class: "svg-ico
|
|
|
1943
1943
|
]),
|
|
1944
1944
|
s2(E1, null, {
|
|
1945
1945
|
default: L2(() => [
|
|
1946
|
-
g("div",
|
|
1947
|
-
g("div",
|
|
1946
|
+
g("div", c3, [
|
|
1947
|
+
g("div", r3, [
|
|
1948
1948
|
g("div", {
|
|
1949
1949
|
class: $2(["shape-panel-row", { "not-bind-width-height": Z.value || !a2.value }])
|
|
1950
1950
|
}, [
|
|
1951
|
-
g("div",
|
|
1951
|
+
g("div", d3, [
|
|
1952
1952
|
T[17] || (T[17] = g("div", { class: "icon" }, "X", -1)),
|
|
1953
1953
|
s2(g2, {
|
|
1954
1954
|
modelValue: l2.value,
|
|
@@ -1957,7 +1957,7 @@ const C4 = { class: "fill-style-box" }, B4 = ["onClick"], I4 = { class: "svg-ico
|
|
|
1957
1957
|
"controls-position": "right"
|
|
1958
1958
|
}, null, 8, ["modelValue"])
|
|
1959
1959
|
]),
|
|
1960
|
-
g("div",
|
|
1960
|
+
g("div", h3, [
|
|
1961
1961
|
T[18] || (T[18] = g("div", { class: "icon" }, "Y", -1)),
|
|
1962
1962
|
s2(g2, {
|
|
1963
1963
|
modelValue: Q2.value,
|
|
@@ -1966,7 +1966,7 @@ const C4 = { class: "fill-style-box" }, B4 = ["onClick"], I4 = { class: "svg-ico
|
|
|
1966
1966
|
"controls-position": "right"
|
|
1967
1967
|
}, null, 8, ["modelValue"])
|
|
1968
1968
|
]),
|
|
1969
|
-
Z.value ? p2("", !0) : (A(), R("div",
|
|
1969
|
+
Z.value ? p2("", !0) : (A(), R("div", p3, [
|
|
1970
1970
|
T[19] || (T[19] = g("div", { class: "icon" }, "W", -1)),
|
|
1971
1971
|
s2(g2, {
|
|
1972
1972
|
modelValue: n2.value,
|
|
@@ -1975,7 +1975,7 @@ const C4 = { class: "fill-style-box" }, B4 = ["onClick"], I4 = { class: "svg-ico
|
|
|
1975
1975
|
"controls-position": "right"
|
|
1976
1976
|
}, null, 8, ["modelValue"])
|
|
1977
1977
|
])),
|
|
1978
|
-
Z.value ? p2("", !0) : (A(), R("div",
|
|
1978
|
+
Z.value ? p2("", !0) : (A(), R("div", u3, [
|
|
1979
1979
|
T[20] || (T[20] = g("div", { class: "icon" }, "H", -1)),
|
|
1980
1980
|
s2(g2, {
|
|
1981
1981
|
modelValue: t6.value,
|
|
@@ -2005,7 +2005,7 @@ const C4 = { class: "fill-style-box" }, B4 = ["onClick"], I4 = { class: "svg-ico
|
|
|
2005
2005
|
style: G2({ left: 32 + P2.value * 8 + "px" })
|
|
2006
2006
|
}, "°", 4)
|
|
2007
2007
|
], 32)) : p2("", !0),
|
|
2008
|
-
o2.value ? (A(), R("div",
|
|
2008
|
+
o2.value ? (A(), R("div", f3, [
|
|
2009
2009
|
g("div", {
|
|
2010
2010
|
class: $2(["btn-item", { active: w2.value }]),
|
|
2011
2011
|
onClick: d2
|
|
@@ -2029,14 +2029,14 @@ const C4 = { class: "fill-style-box" }, B4 = ["onClick"], I4 = { class: "svg-ico
|
|
|
2029
2029
|
class: $2(["bind-box", { active: n1.value }]),
|
|
2030
2030
|
onClick: g6
|
|
2031
2031
|
}, [
|
|
2032
|
-
(A(), R("svg",
|
|
2032
|
+
(A(), R("svg", v3, [
|
|
2033
2033
|
g("use", {
|
|
2034
2034
|
"xlink:href": n1.value ? "#icon-suoding1" : "#icon-quxiaosuoding"
|
|
2035
|
-
}, null, 8,
|
|
2035
|
+
}, null, 8, m3)
|
|
2036
2036
|
]))
|
|
2037
2037
|
], 2))
|
|
2038
2038
|
]),
|
|
2039
|
-
a2.value ? (A(), R("div",
|
|
2039
|
+
a2.value ? (A(), R("div", g3, [
|
|
2040
2040
|
T[25] || (T[25] = g("div", {
|
|
2041
2041
|
class: "item-label",
|
|
2042
2042
|
style: { "padding-right": "8px" }
|
|
@@ -2063,7 +2063,7 @@ const C4 = { class: "fill-style-box" }, B4 = ["onClick"], I4 = { class: "svg-ico
|
|
|
2063
2063
|
T[31] || (T[31] = g("div", { class: "type-item-title" }, [
|
|
2064
2064
|
g("div", { class: "title" }, "填充")
|
|
2065
2065
|
], -1)),
|
|
2066
|
-
g("div",
|
|
2066
|
+
g("div", y3, [
|
|
2067
2067
|
T[27] || (T[27] = g("div", { class: "title" }, "颜色", -1)),
|
|
2068
2068
|
s2(c2, {
|
|
2069
2069
|
color: X.value,
|
|
@@ -2082,14 +2082,14 @@ const C4 = { class: "fill-style-box" }, B4 = ["onClick"], I4 = { class: "svg-ico
|
|
|
2082
2082
|
ref: t,
|
|
2083
2083
|
onClick: T[7] || (T[7] = (E6) => o1())
|
|
2084
2084
|
}, [
|
|
2085
|
-
X.value == "transparent" || !X.value || U.value == 0 ? (A(), R("svg",
|
|
2085
|
+
X.value == "transparent" || !X.value || U.value == 0 ? (A(), R("svg", x3, [...T[26] || (T[26] = [
|
|
2086
2086
|
g("use", { "xlink:href": "#icon-wuyanse" }, null, -1)
|
|
2087
2087
|
])])) : (A(), R("div", {
|
|
2088
2088
|
key: 1,
|
|
2089
2089
|
class: "color-box",
|
|
2090
2090
|
style: G2({ background: C.value })
|
|
2091
2091
|
}, null, 4)),
|
|
2092
|
-
g("div",
|
|
2092
|
+
g("div", b3, l6(X.value != "transparent" ? X.value.substring(
|
|
2093
2093
|
0,
|
|
2094
2094
|
7
|
|
2095
2095
|
).toUpperCase() : X.value), 1)
|
|
@@ -2098,7 +2098,7 @@ const C4 = { class: "fill-style-box" }, B4 = ["onClick"], I4 = { class: "svg-ico
|
|
|
2098
2098
|
_: 1
|
|
2099
2099
|
}, 8, ["color", "options"])
|
|
2100
2100
|
]),
|
|
2101
|
-
g("div",
|
|
2101
|
+
g("div", w3, [
|
|
2102
2102
|
T[28] || (T[28] = g("div", { class: "title" }, "透明度", -1)),
|
|
2103
2103
|
s2(C2, {
|
|
2104
2104
|
modelValue: U.value,
|
|
@@ -2109,7 +2109,7 @@ const C4 = { class: "fill-style-box" }, B4 = ["onClick"], I4 = { class: "svg-ico
|
|
|
2109
2109
|
max: 100
|
|
2110
2110
|
}, null, 8, ["modelValue"])
|
|
2111
2111
|
]),
|
|
2112
|
-
g("div",
|
|
2112
|
+
g("div", q3, [
|
|
2113
2113
|
T[29] || (T[29] = g("div", { class: "title" }, "填充样式", -1)),
|
|
2114
2114
|
s2(M0, { style: { width: "100%" } })
|
|
2115
2115
|
])
|
|
@@ -2119,7 +2119,7 @@ const C4 = { class: "fill-style-box" }, B4 = ["onClick"], I4 = { class: "svg-ico
|
|
|
2119
2119
|
T[39] || (T[39] = g("div", { class: "type-item-title" }, [
|
|
2120
2120
|
g("div", { class: "title" }, "描边")
|
|
2121
2121
|
], -1)),
|
|
2122
|
-
g("div",
|
|
2122
|
+
g("div", z3, [
|
|
2123
2123
|
T[33] || (T[33] = g("div", { class: "title" }, "颜色", -1)),
|
|
2124
2124
|
s2(c2, {
|
|
2125
2125
|
color: S2.value,
|
|
@@ -2138,14 +2138,14 @@ const C4 = { class: "fill-style-box" }, B4 = ["onClick"], I4 = { class: "svg-ico
|
|
|
2138
2138
|
ref: a,
|
|
2139
2139
|
onClick: T[9] || (T[9] = (E6) => $6())
|
|
2140
2140
|
}, [
|
|
2141
|
-
S2.value == "transparent" || !S2.value || V.value == 0 ? (A(), R("svg",
|
|
2141
|
+
S2.value == "transparent" || !S2.value || V.value == 0 ? (A(), R("svg", k3, [...T[32] || (T[32] = [
|
|
2142
2142
|
g("use", { "xlink:href": "#icon-wuyanse" }, null, -1)
|
|
2143
2143
|
])])) : (A(), R("div", {
|
|
2144
2144
|
key: 1,
|
|
2145
2145
|
class: "color-box",
|
|
2146
2146
|
style: G2({ background: q.value })
|
|
2147
2147
|
}, null, 4)),
|
|
2148
|
-
g("div",
|
|
2148
|
+
g("div", M3, l6(S2.value != "transparent" ? S2.value.substring(
|
|
2149
2149
|
0,
|
|
2150
2150
|
7
|
|
2151
2151
|
).toUpperCase() : S2.value), 1)
|
|
@@ -2154,7 +2154,7 @@ const C4 = { class: "fill-style-box" }, B4 = ["onClick"], I4 = { class: "svg-ico
|
|
|
2154
2154
|
_: 1
|
|
2155
2155
|
}, 8, ["color", "options"])
|
|
2156
2156
|
]),
|
|
2157
|
-
g("div",
|
|
2157
|
+
g("div", F3, [
|
|
2158
2158
|
T[34] || (T[34] = g("div", { class: "title" }, "粗细", -1)),
|
|
2159
2159
|
s2(C2, {
|
|
2160
2160
|
modelValue: e2.value,
|
|
@@ -2165,7 +2165,7 @@ const C4 = { class: "fill-style-box" }, B4 = ["onClick"], I4 = { class: "svg-ico
|
|
|
2165
2165
|
max: 10
|
|
2166
2166
|
}, null, 8, ["modelValue"])
|
|
2167
2167
|
]),
|
|
2168
|
-
g("div",
|
|
2168
|
+
g("div", S3, [
|
|
2169
2169
|
T[35] || (T[35] = g("div", { class: "title" }, "透明度", -1)),
|
|
2170
2170
|
s2(C2, {
|
|
2171
2171
|
modelValue: V.value,
|
|
@@ -2176,16 +2176,16 @@ const C4 = { class: "fill-style-box" }, B4 = ["onClick"], I4 = { class: "svg-ico
|
|
|
2176
2176
|
max: 100
|
|
2177
2177
|
}, null, 8, ["modelValue"])
|
|
2178
2178
|
]),
|
|
2179
|
-
k() != "freedraw" ? (A(), R("div",
|
|
2179
|
+
k() != "freedraw" ? (A(), R("div", C3, [
|
|
2180
2180
|
T[36] || (T[36] = g("div", { class: "title" }, "样式", -1)),
|
|
2181
2181
|
s2(F0, { style: { width: "100%" } })
|
|
2182
2182
|
])) : p2("", !0),
|
|
2183
|
-
g("div",
|
|
2183
|
+
g("div", B3, [
|
|
2184
2184
|
T[37] || (T[37] = g("div", { class: "title" }, "风格", -1)),
|
|
2185
2185
|
s2(S0, { style: { width: "100%" } })
|
|
2186
2186
|
]),
|
|
2187
|
-
i2.value ? (A(), R("div",
|
|
2188
|
-
g("div",
|
|
2187
|
+
i2.value ? (A(), R("div", I3, [
|
|
2188
|
+
g("div", E3, l6(k() == "arrow" ? "箭头" : "线条") + "类型", 1),
|
|
2189
2189
|
s2(I0, { style: { width: "100%" } })
|
|
2190
2190
|
])) : p2("", !0)
|
|
2191
2191
|
], 64)) : p2("", !0),
|
|
@@ -2194,10 +2194,10 @@ const C4 = { class: "fill-style-box" }, B4 = ["onClick"], I4 = { class: "svg-ico
|
|
|
2194
2194
|
T[46] || (T[46] = g("div", { class: "type-item-title" }, [
|
|
2195
2195
|
g("div", { class: "title" }, "文本设置")
|
|
2196
2196
|
], -1)),
|
|
2197
|
-
g("div",
|
|
2197
|
+
g("div", T3, [
|
|
2198
2198
|
T[40] || (T[40] = g("div", { class: "title" }, "样式", -1)),
|
|
2199
|
-
g("div",
|
|
2200
|
-
g("div",
|
|
2199
|
+
g("div", H3, [
|
|
2200
|
+
g("div", L3, [
|
|
2201
2201
|
s2(y2, { style: { width: "100%" } }),
|
|
2202
2202
|
s2(y2, {
|
|
2203
2203
|
style: { width: "100%" },
|
|
@@ -2215,7 +2215,7 @@ const C4 = { class: "fill-style-box" }, B4 = ["onClick"], I4 = { class: "svg-ico
|
|
|
2215
2215
|
_: 1
|
|
2216
2216
|
}, 8, ["modelValue"])
|
|
2217
2217
|
]),
|
|
2218
|
-
g("div",
|
|
2218
|
+
g("div", V3, [
|
|
2219
2219
|
s2(h1),
|
|
2220
2220
|
s2(h1)
|
|
2221
2221
|
]),
|
|
@@ -2223,7 +2223,7 @@ const C4 = { class: "fill-style-box" }, B4 = ["onClick"], I4 = { class: "svg-ico
|
|
|
2223
2223
|
s2(B0)
|
|
2224
2224
|
])
|
|
2225
2225
|
]),
|
|
2226
|
-
g("div",
|
|
2226
|
+
g("div", D3, [
|
|
2227
2227
|
T[42] || (T[42] = g("div", { class: "title" }, "文本颜色", -1)),
|
|
2228
2228
|
s2(c2, {
|
|
2229
2229
|
color: I2.value,
|
|
@@ -2242,14 +2242,14 @@ const C4 = { class: "fill-style-box" }, B4 = ["onClick"], I4 = { class: "svg-ico
|
|
|
2242
2242
|
ref: o,
|
|
2243
2243
|
onClick: T[13] || (T[13] = (E6) => C1())
|
|
2244
2244
|
}, [
|
|
2245
|
-
I2.value == "transparent" || !I2.value ? (A(), R("svg",
|
|
2245
|
+
I2.value == "transparent" || !I2.value ? (A(), R("svg", P3, [...T[41] || (T[41] = [
|
|
2246
2246
|
g("use", { "xlink:href": "#icon-wuyanse" }, null, -1)
|
|
2247
2247
|
])])) : (A(), R("div", {
|
|
2248
2248
|
key: 1,
|
|
2249
2249
|
class: "color-box",
|
|
2250
2250
|
style: G2({ background: I2.value })
|
|
2251
2251
|
}, null, 4)),
|
|
2252
|
-
g("div",
|
|
2252
|
+
g("div", A3, l6(I2.value != "transparent" ? I2.value.substring(
|
|
2253
2253
|
0,
|
|
2254
2254
|
7
|
|
2255
2255
|
).toUpperCase() : I2.value), 1)
|
|
@@ -2258,7 +2258,7 @@ const C4 = { class: "fill-style-box" }, B4 = ["onClick"], I4 = { class: "svg-ico
|
|
|
2258
2258
|
_: 1
|
|
2259
2259
|
}, 8, ["color", "options"])
|
|
2260
2260
|
]),
|
|
2261
|
-
g("div",
|
|
2261
|
+
g("div", _3, [
|
|
2262
2262
|
T[44] || (T[44] = g("div", { class: "title" }, "文本背景色", -1)),
|
|
2263
2263
|
s2(c2, {
|
|
2264
2264
|
color: D2.value,
|
|
@@ -2277,14 +2277,14 @@ const C4 = { class: "fill-style-box" }, B4 = ["onClick"], I4 = { class: "svg-ico
|
|
|
2277
2277
|
ref: n,
|
|
2278
2278
|
onClick: T[14] || (T[14] = (E6) => S1())
|
|
2279
2279
|
}, [
|
|
2280
|
-
D2.value == "transparent" || !D2.value ? (A(), R("svg",
|
|
2280
|
+
D2.value == "transparent" || !D2.value ? (A(), R("svg", $3, [...T[43] || (T[43] = [
|
|
2281
2281
|
g("use", { "xlink:href": "#icon-wuyanse" }, null, -1)
|
|
2282
2282
|
])])) : (A(), R("div", {
|
|
2283
2283
|
key: 1,
|
|
2284
2284
|
class: "color-box",
|
|
2285
2285
|
style: G2({ background: D2.value })
|
|
2286
2286
|
}, null, 4)),
|
|
2287
|
-
g("div",
|
|
2287
|
+
g("div", j3, l6(D2.value != "transparent" ? D2.value.substring(
|
|
2288
2288
|
0,
|
|
2289
2289
|
7
|
|
2290
2290
|
).toUpperCase() : D2.value), 1)
|
|
@@ -2301,7 +2301,7 @@ const C4 = { class: "fill-style-box" }, B4 = ["onClick"], I4 = { class: "svg-ico
|
|
|
2301
2301
|
], 4)) : p2("", !0);
|
|
2302
2302
|
};
|
|
2303
2303
|
}
|
|
2304
|
-
}),
|
|
2304
|
+
}), R3 = /* @__PURE__ */ i6(O3, [["__scopeId", "data-v-00889af3"]]);
|
|
2305
2305
|
function _1(i, e, t) {
|
|
2306
2306
|
if (i && i.length) {
|
|
2307
2307
|
const [l, a] = e, s = Math.PI / 180 * t, n = Math.cos(s), o = Math.sin(s);
|
|
@@ -2311,17 +2311,17 @@ function _1(i, e, t) {
|
|
|
2311
2311
|
}
|
|
2312
2312
|
}
|
|
2313
2313
|
}
|
|
2314
|
-
function
|
|
2314
|
+
function X3(i, e) {
|
|
2315
2315
|
return i[0] === e[0] && i[1] === e[1];
|
|
2316
2316
|
}
|
|
2317
|
-
function
|
|
2317
|
+
function Y3(i, e, t, l = 1) {
|
|
2318
2318
|
const a = t, s = Math.max(e, 0.1), n = i[0] && i[0][0] && typeof i[0][0] == "number" ? [i] : i, o = [0, 0];
|
|
2319
2319
|
if (a) for (const r of n) _1(r, o, a);
|
|
2320
2320
|
const c = (function(r, u, y) {
|
|
2321
2321
|
const d = [];
|
|
2322
2322
|
for (const q of r) {
|
|
2323
2323
|
const I = [...q];
|
|
2324
|
-
|
|
2324
|
+
X3(I[0], I[I.length - 1]) || I.push([I[0][0], I[0][1]]), I.length > 2 && d.push(I);
|
|
2325
2325
|
}
|
|
2326
2326
|
const m = [];
|
|
2327
2327
|
u = Math.max(u, 0.1);
|
|
@@ -2370,7 +2370,7 @@ function a1(i, e) {
|
|
|
2370
2370
|
let a = e.hachureGap;
|
|
2371
2371
|
a < 0 && (a = 4 * e.strokeWidth), a = Math.round(Math.max(a, 0.1));
|
|
2372
2372
|
let s = 1;
|
|
2373
|
-
return e.roughness >= 1 && (((t = e.randomizer) === null || t === void 0 ? void 0 : t.next()) || Math.random()) > 0.7 && (s = a),
|
|
2373
|
+
return e.roughness >= 1 && (((t = e.randomizer) === null || t === void 0 ? void 0 : t.next()) || Math.random()) > 0.7 && (s = a), Y3(i, a, l, s || 1);
|
|
2374
2374
|
}
|
|
2375
2375
|
class K1 {
|
|
2376
2376
|
constructor(e) {
|
|
@@ -2393,7 +2393,7 @@ function q1(i) {
|
|
|
2393
2393
|
const e = i[0], t = i[1];
|
|
2394
2394
|
return Math.sqrt(Math.pow(e[0] - t[0], 2) + Math.pow(e[1] - t[1], 2));
|
|
2395
2395
|
}
|
|
2396
|
-
class
|
|
2396
|
+
class Q3 extends K1 {
|
|
2397
2397
|
fillPolygons(e, t) {
|
|
2398
2398
|
let l = t.hachureGap;
|
|
2399
2399
|
l < 0 && (l = 4 * t.strokeWidth), l = Math.max(l, 0.1);
|
|
@@ -2402,13 +2402,13 @@ class Y3 extends K1 {
|
|
|
2402
2402
|
return { type: "fillSketch", ops: this.renderLines(n, t) };
|
|
2403
2403
|
}
|
|
2404
2404
|
}
|
|
2405
|
-
class
|
|
2405
|
+
class Z3 extends K1 {
|
|
2406
2406
|
fillPolygons(e, t) {
|
|
2407
2407
|
const l = this._fillPolygons(e, t), a = Object.assign({}, t, { hachureAngle: t.hachureAngle + 90 }), s = this._fillPolygons(e, a);
|
|
2408
2408
|
return l.ops = l.ops.concat(s.ops), l;
|
|
2409
2409
|
}
|
|
2410
2410
|
}
|
|
2411
|
-
class
|
|
2411
|
+
class W3 {
|
|
2412
2412
|
constructor(e) {
|
|
2413
2413
|
this.helper = e;
|
|
2414
2414
|
}
|
|
@@ -2433,7 +2433,7 @@ class Z3 {
|
|
|
2433
2433
|
return { type: "fillSketch", ops: l };
|
|
2434
2434
|
}
|
|
2435
2435
|
}
|
|
2436
|
-
class
|
|
2436
|
+
class U3 {
|
|
2437
2437
|
constructor(e) {
|
|
2438
2438
|
this.helper = e;
|
|
2439
2439
|
}
|
|
@@ -2455,7 +2455,7 @@ class W3 {
|
|
|
2455
2455
|
})), s;
|
|
2456
2456
|
}
|
|
2457
2457
|
}
|
|
2458
|
-
class
|
|
2458
|
+
class G3 {
|
|
2459
2459
|
constructor(e) {
|
|
2460
2460
|
this.helper = e;
|
|
2461
2461
|
}
|
|
@@ -2478,7 +2478,7 @@ class U3 {
|
|
|
2478
2478
|
}
|
|
2479
2479
|
}
|
|
2480
2480
|
const d6 = {};
|
|
2481
|
-
class
|
|
2481
|
+
class N3 {
|
|
2482
2482
|
constructor(e) {
|
|
2483
2483
|
this.seed = e;
|
|
2484
2484
|
}
|
|
@@ -2486,7 +2486,7 @@ class G3 {
|
|
|
2486
2486
|
return this.seed ? (2 ** 31 - 1 & (this.seed = Math.imul(48271, this.seed))) / 2 ** 31 : Math.random();
|
|
2487
2487
|
}
|
|
2488
2488
|
}
|
|
2489
|
-
const
|
|
2489
|
+
const K3 = 0, $1 = 1, d0 = 2, u1 = { A: 7, a: 7, C: 6, c: 6, H: 1, h: 1, L: 2, l: 2, M: 2, m: 2, Q: 4, q: 4, S: 4, s: 4, T: 2, t: 2, V: 1, v: 1, Z: 0, z: 0 };
|
|
2490
2490
|
function j1(i, e) {
|
|
2491
2491
|
return i.type === e;
|
|
2492
2492
|
}
|
|
@@ -2494,7 +2494,7 @@ function J1(i) {
|
|
|
2494
2494
|
const e = [], t = (function(n) {
|
|
2495
2495
|
const o = new Array();
|
|
2496
2496
|
for (; n !== ""; ) if (n.match(/^([ \t\r\n,]+)/)) n = n.substr(RegExp.$1.length);
|
|
2497
|
-
else if (n.match(/^([aAcChHlLmMqQsStTvVzZ])/)) o[o.length] = { type:
|
|
2497
|
+
else if (n.match(/^([aAcChHlLmMqQsStTvVzZ])/)) o[o.length] = { type: K3, text: RegExp.$1 }, n = n.substr(RegExp.$1.length);
|
|
2498
2498
|
else {
|
|
2499
2499
|
if (!n.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/)) return [];
|
|
2500
2500
|
o[o.length] = { type: $1, text: `${parseFloat(RegExp.$1)}` }, n = n.substr(RegExp.$1.length);
|
|
@@ -2679,7 +2679,7 @@ function H0(i, e, t, l, a, s, n, o, c, r) {
|
|
|
2679
2679
|
return V;
|
|
2680
2680
|
}
|
|
2681
2681
|
}
|
|
2682
|
-
const
|
|
2682
|
+
const J3 = { randOffset: function(i, e) {
|
|
2683
2683
|
return r2(i, e);
|
|
2684
2684
|
}, randOffsetWithRange: function(i, e, t) {
|
|
2685
2685
|
return y1(i, e, t);
|
|
@@ -2701,7 +2701,7 @@ function m1(i, e, t) {
|
|
|
2701
2701
|
}
|
|
2702
2702
|
return l === 2 ? L0(i[0][0], i[0][1], i[1][0], i[1][1], t) : { type: "path", ops: [] };
|
|
2703
2703
|
}
|
|
2704
|
-
function
|
|
2704
|
+
function t8(i, e, t, l, a) {
|
|
2705
2705
|
return (function(s, n) {
|
|
2706
2706
|
return m1(s, !0, n);
|
|
2707
2707
|
})([[i, e], [i + t, e], [i + t, e + l], [i, e + l]], a);
|
|
@@ -2762,7 +2762,7 @@ function u0(i, e) {
|
|
|
2762
2762
|
break;
|
|
2763
2763
|
case "C": {
|
|
2764
2764
|
const [c, r, u, y, d, m] = o;
|
|
2765
|
-
l.push(...
|
|
2765
|
+
l.push(...e8(c, r, u, y, d, m, s, e)), s = [d, m];
|
|
2766
2766
|
break;
|
|
2767
2767
|
}
|
|
2768
2768
|
case "Z":
|
|
@@ -2786,32 +2786,32 @@ function Q6(i, e) {
|
|
|
2786
2786
|
let a = t.fillStyle || "hachure";
|
|
2787
2787
|
if (!d6[a]) switch (a) {
|
|
2788
2788
|
case "zigzag":
|
|
2789
|
-
d6[a] || (d6[a] = new
|
|
2789
|
+
d6[a] || (d6[a] = new Q3(l));
|
|
2790
2790
|
break;
|
|
2791
2791
|
case "cross-hatch":
|
|
2792
|
-
d6[a] || (d6[a] = new
|
|
2792
|
+
d6[a] || (d6[a] = new Z3(l));
|
|
2793
2793
|
break;
|
|
2794
2794
|
case "dots":
|
|
2795
|
-
d6[a] || (d6[a] = new
|
|
2795
|
+
d6[a] || (d6[a] = new W3(l));
|
|
2796
2796
|
break;
|
|
2797
2797
|
case "dashed":
|
|
2798
|
-
d6[a] || (d6[a] = new
|
|
2798
|
+
d6[a] || (d6[a] = new U3(l));
|
|
2799
2799
|
break;
|
|
2800
2800
|
case "zigzag-line":
|
|
2801
|
-
d6[a] || (d6[a] = new
|
|
2801
|
+
d6[a] || (d6[a] = new G3(l));
|
|
2802
2802
|
break;
|
|
2803
2803
|
default:
|
|
2804
2804
|
a = "hachure", d6[a] || (d6[a] = new K1(l));
|
|
2805
2805
|
}
|
|
2806
2806
|
return d6[a];
|
|
2807
|
-
})(e,
|
|
2807
|
+
})(e, J3).fillPolygons(i, e);
|
|
2808
2808
|
}
|
|
2809
2809
|
function f0(i) {
|
|
2810
2810
|
const e = Object.assign({}, i);
|
|
2811
2811
|
return e.randomizer = void 0, i.seed && (e.seed = i.seed + 1), e;
|
|
2812
2812
|
}
|
|
2813
2813
|
function D0(i) {
|
|
2814
|
-
return i.randomizer || (i.randomizer = new
|
|
2814
|
+
return i.randomizer || (i.randomizer = new N3(i.seed || 0)), i.randomizer.next();
|
|
2815
2815
|
}
|
|
2816
2816
|
function y1(i, e, t, l = 1) {
|
|
2817
2817
|
return t.roughness * l * (D0(t) * (e - i) + i);
|
|
@@ -2883,7 +2883,7 @@ function m0(i, e, t, l, a, s, n, o, c) {
|
|
|
2883
2883
|
for (let y = r; y <= n; y += i) u.push([r2(o, c) + e + l * Math.cos(y), r2(o, c) + t + a * Math.sin(y)]);
|
|
2884
2884
|
return u.push([e + l * Math.cos(n), t + a * Math.sin(n)]), u.push([e + l * Math.cos(n), t + a * Math.sin(n)]), x1(u, null, c);
|
|
2885
2885
|
}
|
|
2886
|
-
function
|
|
2886
|
+
function e8(i, e, t, l, a, s, n, o) {
|
|
2887
2887
|
const c = [], r = [o.maxRandomnessOffset || 1, (o.maxRandomnessOffset || 1) + 0.3];
|
|
2888
2888
|
let u = [0, 0];
|
|
2889
2889
|
const y = o.disableMultiStroke ? 1 : 2, d = o.preserveVertices;
|
|
@@ -2914,7 +2914,7 @@ function g0(i, e = 0) {
|
|
|
2914
2914
|
function g1(i, e) {
|
|
2915
2915
|
return Math.pow(i[0] - e[0], 2) + Math.pow(i[1] - e[1], 2);
|
|
2916
2916
|
}
|
|
2917
|
-
function
|
|
2917
|
+
function l8(i, e, t) {
|
|
2918
2918
|
const l = g1(e, t);
|
|
2919
2919
|
if (l === 0) return g1(i, e);
|
|
2920
2920
|
let a = ((i[0] - e[0]) * (t[0] - e[0]) + (i[1] - e[1]) * (t[1] - e[1])) / l;
|
|
@@ -2945,14 +2945,14 @@ function G1(i, e, t, l) {
|
|
|
2945
2945
|
var s, n;
|
|
2946
2946
|
return a;
|
|
2947
2947
|
}
|
|
2948
|
-
function
|
|
2948
|
+
function a8(i, e) {
|
|
2949
2949
|
return b1(i, 0, i.length, e);
|
|
2950
2950
|
}
|
|
2951
2951
|
function b1(i, e, t, l, a) {
|
|
2952
2952
|
const s = a || [], n = i[e], o = i[t - 1];
|
|
2953
2953
|
let c = 0, r = 1;
|
|
2954
2954
|
for (let u = e + 1; u < t - 1; ++u) {
|
|
2955
|
-
const y =
|
|
2955
|
+
const y = l8(i[u], n, o);
|
|
2956
2956
|
y > c && (c = y, r = u);
|
|
2957
2957
|
}
|
|
2958
2958
|
return Math.sqrt(c) > l ? (b1(i, e, r + 1, l, s), b1(i, r, t, l, s)) : (s.length || s.push(n), s.push(o)), s;
|
|
@@ -2982,7 +2982,7 @@ class w1 {
|
|
|
2982
2982
|
return this._d("line", [L0(e, t, l, a, n)], n);
|
|
2983
2983
|
}
|
|
2984
2984
|
rectangle(e, t, l, a, s) {
|
|
2985
|
-
const n = this._o(s), o = [], c =
|
|
2985
|
+
const n = this._o(s), o = [], c = t8(e, t, l, a, n);
|
|
2986
2986
|
if (n.fill) {
|
|
2987
2987
|
const r = [[e, t], [e + l, t], [e + l, t + a], [e, t + a]];
|
|
2988
2988
|
n.fillStyle === "solid" ? o.push(O1([r], n)) : o.push(Q6([r], n));
|
|
@@ -3076,7 +3076,7 @@ class w1 {
|
|
|
3076
3076
|
if (I(), !d) return p;
|
|
3077
3077
|
const j = [];
|
|
3078
3078
|
for (const Z of p) {
|
|
3079
|
-
const a2 =
|
|
3079
|
+
const a2 = a8(Z, d);
|
|
3080
3080
|
a2.length && j.push(a2);
|
|
3081
3081
|
}
|
|
3082
3082
|
return j;
|
|
@@ -3133,7 +3133,7 @@ class w1 {
|
|
|
3133
3133
|
return e.filter(((t, l) => l === 0 || t.op !== "move"));
|
|
3134
3134
|
}
|
|
3135
3135
|
}
|
|
3136
|
-
class
|
|
3136
|
+
class i8 {
|
|
3137
3137
|
constructor(e, t) {
|
|
3138
3138
|
this.canvas = e, this.ctx = this.canvas.getContext("2d"), this.gen = new w1(t);
|
|
3139
3139
|
}
|
|
@@ -3218,7 +3218,7 @@ class a8 {
|
|
|
3218
3218
|
}
|
|
3219
3219
|
}
|
|
3220
3220
|
const v1 = "http://www.w3.org/2000/svg";
|
|
3221
|
-
class
|
|
3221
|
+
class n8 {
|
|
3222
3222
|
constructor(e, t) {
|
|
3223
3223
|
this.svg = e, this.gen = new w1(t);
|
|
3224
3224
|
}
|
|
@@ -3292,8 +3292,8 @@ class i8 {
|
|
|
3292
3292
|
return this.draw(l);
|
|
3293
3293
|
}
|
|
3294
3294
|
}
|
|
3295
|
-
var
|
|
3296
|
-
const y0 = /* @__PURE__ */ new Map(), X1 = /* @__PURE__ */ new Map(),
|
|
3295
|
+
var s8 = { canvas: (i, e) => new i8(i, e), svg: (i, e) => new n8(i, e), generator: (i) => new w1(i), newSeed: () => w1.newSeed() };
|
|
3296
|
+
const y0 = /* @__PURE__ */ new Map(), X1 = /* @__PURE__ */ new Map(), o8 = (i) => {
|
|
3297
3297
|
if (X1.has(i)) return X1.get(i);
|
|
3298
3298
|
const e = document.createElement("canvas");
|
|
3299
3299
|
e.width = 40, e.height = 40;
|
|
@@ -3305,7 +3305,7 @@ const y0 = /* @__PURE__ */ new Map(), X1 = /* @__PURE__ */ new Map(), s8 = (i) =
|
|
|
3305
3305
|
t.scale(n, n), t.translate(-512, -512);
|
|
3306
3306
|
const o = new Path2D("M771.09045312 471.64751562L252.89970312 471.64751562c-44.7575625 0-81.03670312 36.20432813-81.03670312 80.87625001l0 343.07339062c0 44.67290625 36.27914062 80.87625 81.03670312 80.87625l518.19173438 0c44.75854688 0 81.04753125-36.20334375 81.04753125-80.87625L852.13896875 552.52376563C852.13798437 507.85184375 815.849 471.64751562 771.09045312 471.64751562zM546.12434375 721.73979687l0 90.04964063c0 18.8409375-15.26864062 34.13123438-34.12926563 34.13123438-18.84979688 0-34.12926563-15.29029687-34.12926562-34.13123438l0-90.04964062c-20.37951562-11.804625-34.13025-33.80835938-34.13025-59.06348438 0-37.7015625 30.55795313-68.2605 68.25951562-68.2605s68.27034375 30.5589375 68.27034375 68.2605C580.26542188 687.9314375 566.52551562 709.93517188 546.12434375 721.73979687zM511.99507812 147.37175c-131.95251562 0-238.92946875 105.46889063-238.92946875 244.04034375l1e-8 105.98273437 477.87075 22.75284375L750.93635938 391.41209375C750.93635938 252.84064062 643.95940625 147.37175 511.99507812 147.37175zM341.36745312 491.406875L341.36745312 389.03876562c0-94.2204375 76.395375-170.627625 170.62664063-170.627625 94.24209375 0 170.627625 76.4071875 170.627625 170.627625l0 104.76309375L341.36745312 491.406875z");
|
|
3307
3307
|
return t.fillStyle = i, t.fill(o), t.restore(), X1.set(i, e), e;
|
|
3308
|
-
},
|
|
3308
|
+
}, c8 = (i, e, t, l, a, s, n) => {
|
|
3309
3309
|
if (n === "none") return;
|
|
3310
3310
|
const o = e.width / s, c = e.height / s, r = -t, u = -l, y = r + o / a, d = u + c / a, m = 20, p = Math.floor(r / m) * m, M = Math.floor(u / m) * m;
|
|
3311
3311
|
if (i.save(), n === "dot") {
|
|
@@ -3335,13 +3335,13 @@ const y0 = /* @__PURE__ */ new Map(), X1 = /* @__PURE__ */ new Map(), s8 = (i) =
|
|
|
3335
3335
|
i.stroke();
|
|
3336
3336
|
}
|
|
3337
3337
|
i.restore();
|
|
3338
|
-
},
|
|
3338
|
+
}, r8 = (i, e, t, l, a, s = {}, n = null, o = {}, c = null, r = {}, u = "none", y = null, d = "#FFFFFF") => {
|
|
3339
3339
|
const m = i.getContext("2d");
|
|
3340
3340
|
if (!m) return;
|
|
3341
|
-
const p =
|
|
3341
|
+
const p = s8.canvas(i);
|
|
3342
3342
|
m.clearRect(0, 0, i.width, i.height), m.fillStyle = d, m.fillRect(0, 0, i.width, i.height);
|
|
3343
3343
|
const M = window.devicePixelRatio || 1;
|
|
3344
|
-
m.save(), m.scale(M, M), m.scale(a, a), m.translate(t, l),
|
|
3344
|
+
m.save(), m.scale(M, M), m.scale(a, a), m.translate(t, l), c8(m, i, t, l, a, M, u);
|
|
3345
3345
|
const k = [], C = [], q = [], I = [], j = {};
|
|
3346
3346
|
e.forEach((V) => {
|
|
3347
3347
|
if (V.isDeleted) return;
|
|
@@ -3620,7 +3620,7 @@ const y0 = /* @__PURE__ */ new Map(), X1 = /* @__PURE__ */ new Map(), s8 = (i) =
|
|
|
3620
3620
|
break;
|
|
3621
3621
|
}
|
|
3622
3622
|
if (e.globalAlpha = 1, a && !t.containerId && (e.strokeStyle = t.locked ? "#d2e2ff" : "#1e6fff", e.lineWidth = 1, n === "dashed" && e.setLineDash([5, 5]), e.strokeRect(-4, -4, t.width + 8, t.height + 8), e.setLineDash([]), t.locked)) {
|
|
3623
|
-
const a2 =
|
|
3623
|
+
const a2 = o8(r ? "#1e6fff" : "black");
|
|
3624
3624
|
a2 && e.drawImage(a2, 0, -50, 40, 40);
|
|
3625
3625
|
}
|
|
3626
3626
|
if (o) {
|
|
@@ -3666,7 +3666,7 @@ const y0 = /* @__PURE__ */ new Map(), X1 = /* @__PURE__ */ new Map(), s8 = (i) =
|
|
|
3666
3666
|
e.stroke();
|
|
3667
3667
|
}
|
|
3668
3668
|
e.restore();
|
|
3669
|
-
},
|
|
3669
|
+
}, d8 = (i) => {
|
|
3670
3670
|
if (i.length < 3) return i;
|
|
3671
3671
|
let e = [...i];
|
|
3672
3672
|
for (let t = 0; t < 2; t++) {
|
|
@@ -3687,7 +3687,7 @@ const y0 = /* @__PURE__ */ new Map(), X1 = /* @__PURE__ */ new Map(), s8 = (i) =
|
|
|
3687
3687
|
l.push(e[e.length - 1]), e = l;
|
|
3688
3688
|
}
|
|
3689
3689
|
return e;
|
|
3690
|
-
},
|
|
3690
|
+
}, h8 = (i, e, t, l, a) => {
|
|
3691
3691
|
const s = i.getContext("2d");
|
|
3692
3692
|
if (!s || e.length === 0) return;
|
|
3693
3693
|
s.save();
|
|
@@ -3696,7 +3696,7 @@ const y0 = /* @__PURE__ */ new Map(), X1 = /* @__PURE__ */ new Map(), s8 = (i) =
|
|
|
3696
3696
|
const o = Date.now(), c = 1600;
|
|
3697
3697
|
e.forEach((r) => {
|
|
3698
3698
|
if (r.length < 2) return;
|
|
3699
|
-
const u =
|
|
3699
|
+
const u = d8(r);
|
|
3700
3700
|
for (let y = 0; y < u.length - 1; y++) {
|
|
3701
3701
|
const d = u[y], m = u[y + 1];
|
|
3702
3702
|
if (!d || !m) continue;
|
|
@@ -3829,7 +3829,7 @@ const y0 = /* @__PURE__ */ new Map(), X1 = /* @__PURE__ */ new Map(), s8 = (i) =
|
|
|
3829
3829
|
}
|
|
3830
3830
|
};
|
|
3831
3831
|
let K2 = null;
|
|
3832
|
-
const
|
|
3832
|
+
const p8 = {
|
|
3833
3833
|
height: "0",
|
|
3834
3834
|
visibility: "hidden",
|
|
3835
3835
|
overflow: "hidden",
|
|
@@ -3839,14 +3839,14 @@ const h8 = {
|
|
|
3839
3839
|
right: "0",
|
|
3840
3840
|
whiteSpace: "pre-wrap"
|
|
3841
3841
|
};
|
|
3842
|
-
function
|
|
3842
|
+
function u8(i, e = 1, t = null) {
|
|
3843
3843
|
if (!i) return;
|
|
3844
3844
|
K2 || (K2 = document.createElement("textarea"), (i.parentNode ?? document.body).appendChild(K2));
|
|
3845
|
-
const { paddingSize: l, borderSize: a, boxSizing: s, contextStyle: n, lineHeight: o } =
|
|
3845
|
+
const { paddingSize: l, borderSize: a, boxSizing: s, contextStyle: n, lineHeight: o } = v8(i);
|
|
3846
3846
|
n.forEach((k) => {
|
|
3847
3847
|
const C = k[0], q = k[1] ?? "";
|
|
3848
3848
|
K2 && K2.style.setProperty(C, q);
|
|
3849
|
-
}), Object.entries(
|
|
3849
|
+
}), Object.entries(p8).forEach(([k, C]) => {
|
|
3850
3850
|
K2 && K2.style.setProperty(k, C, "important");
|
|
3851
3851
|
}), K2.style.width = window.getComputedStyle(i).getPropertyValue("width"), K2.value = i.value || (i.placeholder ?? "");
|
|
3852
3852
|
const c = K2.scrollHeight;
|
|
@@ -3865,7 +3865,7 @@ function p8(i, e = 1, t = null) {
|
|
|
3865
3865
|
};
|
|
3866
3866
|
return K2 && K2.parentNode && K2.parentNode.removeChild(K2), K2 = null, M;
|
|
3867
3867
|
}
|
|
3868
|
-
const
|
|
3868
|
+
const f8 = [
|
|
3869
3869
|
"letter-spacing",
|
|
3870
3870
|
"line-height",
|
|
3871
3871
|
"padding-top",
|
|
@@ -3883,14 +3883,14 @@ const u8 = [
|
|
|
3883
3883
|
"box-sizing",
|
|
3884
3884
|
"word-break"
|
|
3885
3885
|
];
|
|
3886
|
-
function
|
|
3887
|
-
const e = window.getComputedStyle(i), t = e.getPropertyValue("box-sizing"), l = Number.parseFloat(e.getPropertyValue("padding-bottom")) + Number.parseFloat(e.getPropertyValue("padding-top")), a = Number.parseFloat(e.getPropertyValue("border-bottom-width")) + Number.parseFloat(e.getPropertyValue("border-top-width")), s =
|
|
3886
|
+
function v8(i) {
|
|
3887
|
+
const e = window.getComputedStyle(i), t = e.getPropertyValue("box-sizing"), l = Number.parseFloat(e.getPropertyValue("padding-bottom")) + Number.parseFloat(e.getPropertyValue("padding-top")), a = Number.parseFloat(e.getPropertyValue("border-bottom-width")) + Number.parseFloat(e.getPropertyValue("border-top-width")), s = f8.map((o) => [
|
|
3888
3888
|
o,
|
|
3889
3889
|
e.getPropertyValue(o)
|
|
3890
3890
|
]), n = parseFloat(e.getPropertyValue("line-height"));
|
|
3891
3891
|
return { contextStyle: s, paddingSize: l, borderSize: a, boxSizing: t, lineHeight: n };
|
|
3892
3892
|
}
|
|
3893
|
-
const
|
|
3893
|
+
const m8 = { key: 0 }, g8 = { key: 1 }, y8 = /* @__PURE__ */ J2({
|
|
3894
3894
|
__name: "ContextMenu",
|
|
3895
3895
|
props: {
|
|
3896
3896
|
visible: { type: Boolean },
|
|
@@ -3929,7 +3929,7 @@ const v8 = { key: 0 }, m8 = { key: 1 }, g8 = /* @__PURE__ */ J2({
|
|
|
3929
3929
|
onMousedown: r[14] || (r[14] = F6(() => {
|
|
3930
3930
|
}, ["stop"]))
|
|
3931
3931
|
}, [
|
|
3932
|
-
i.isElementSelected ? (A(), R("ul",
|
|
3932
|
+
i.isElementSelected ? (A(), R("ul", m8, [
|
|
3933
3933
|
g("li", {
|
|
3934
3934
|
onClick: r[0] || (r[0] = (u) => o("cut"))
|
|
3935
3935
|
}, [...r[15] || (r[15] = [
|
|
@@ -3988,7 +3988,7 @@ const v8 = { key: 0 }, m8 = { key: 1 }, g8 = /* @__PURE__ */ J2({
|
|
|
3988
3988
|
g("span", null, "删除", -1),
|
|
3989
3989
|
g("span", { class: "shortcut" }, "Del", -1)
|
|
3990
3990
|
])])
|
|
3991
|
-
])) : (A(), R("ul",
|
|
3991
|
+
])) : (A(), R("ul", g8, [
|
|
3992
3992
|
g("li", {
|
|
3993
3993
|
onClick: r[9] || (r[9] = (u) => o("paste"))
|
|
3994
3994
|
}, [...r[27] || (r[27] = [
|
|
@@ -4010,10 +4010,10 @@ const v8 = { key: 0 }, m8 = { key: 1 }, g8 = /* @__PURE__ */ J2({
|
|
|
4010
4010
|
]))
|
|
4011
4011
|
], 36)) : p2("", !0);
|
|
4012
4012
|
}
|
|
4013
|
-
}),
|
|
4013
|
+
}), x8 = /* @__PURE__ */ i6(y8, [["__scopeId", "data-v-22c72497"]]), b8 = {
|
|
4014
4014
|
class: "excalidraw-container",
|
|
4015
4015
|
ref: "container"
|
|
4016
|
-
},
|
|
4016
|
+
}, w8 = ["width", "height"], q8 = `url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2"><path d="M20 20H7L3 16C2 15 2 13 3 12L13 2L22 11L20 20Z" fill="white"/></svg>') 0 20, auto`, z8 = /* @__PURE__ */ J2({
|
|
4017
4017
|
__name: "ExcalidrawCanvas",
|
|
4018
4018
|
props: {
|
|
4019
4019
|
elements: {},
|
|
@@ -4022,7 +4022,7 @@ const v8 = { key: 0 }, m8 = { key: 1 }, g8 = /* @__PURE__ */ J2({
|
|
|
4022
4022
|
scrollY: {}
|
|
4023
4023
|
},
|
|
4024
4024
|
setup(i) {
|
|
4025
|
-
const e = i, t =
|
|
4025
|
+
const e = i, t = a6(), l = N(null), a = N(null), s = N(window.innerWidth), n = N(window.innerHeight), o = N(window.devicePixelRatio || 1), c = N(!1), r = () => {
|
|
4026
4026
|
s.value = window.innerWidth, n.value = window.innerHeight, o.value = window.devicePixelRatio || 1, _6(() => {
|
|
4027
4027
|
E2();
|
|
4028
4028
|
});
|
|
@@ -4150,7 +4150,7 @@ const v8 = { key: 0 }, m8 = { key: 1 }, g8 = /* @__PURE__ */ J2({
|
|
|
4150
4150
|
if (c.value)
|
|
4151
4151
|
return "grabbing";
|
|
4152
4152
|
const f = t.appConfig.editable === !1 ? "hand" : t.appState.activeTool === "shapes" ? t.appState.activeToolType : t.appState.activeTool;
|
|
4153
|
-
return f === "hand" ? t.appState.viewLocked ? "not-allowed" : d.value ? "grabbing" : "grab" : f === "selection" ? C.value ? "move" : d.value ? o1(q.value) : "default" : f === "text" ? "text" : f === "eraser" ?
|
|
4153
|
+
return f === "hand" ? t.appState.viewLocked ? "not-allowed" : d.value ? "grabbing" : "grab" : f === "selection" ? C.value ? "move" : d.value ? o1(q.value) : "default" : f === "text" ? "text" : f === "eraser" ? q8 : "crosshair";
|
|
4154
4154
|
}, V2 = Q(() => {
|
|
4155
4155
|
if (!W.value) return {};
|
|
4156
4156
|
const f = t.elements.find((h) => h.id === W.value);
|
|
@@ -5079,7 +5079,7 @@ const v8 = { key: 0 }, m8 = { key: 1 }, g8 = /* @__PURE__ */ J2({
|
|
|
5079
5079
|
};
|
|
5080
5080
|
M6(() => e2.value, (f) => {
|
|
5081
5081
|
if (W.value) {
|
|
5082
|
-
f && a.value ? t6.value =
|
|
5082
|
+
f && a.value ? t6.value = u8(a.value, 1, null).height : t6.value = "23px";
|
|
5083
5083
|
const b = t.elements.find((x) => x.id === W.value);
|
|
5084
5084
|
if (b && b.type === "text")
|
|
5085
5085
|
if (b.containerId) {
|
|
@@ -5435,7 +5435,7 @@ const v8 = { key: 0 }, m8 = { key: 1 }, g8 = /* @__PURE__ */ J2({
|
|
|
5435
5435
|
const E2 = () => {
|
|
5436
5436
|
E6 && cancelAnimationFrame(E6), E6 = requestAnimationFrame(() => {
|
|
5437
5437
|
if (l.value) {
|
|
5438
|
-
if (
|
|
5438
|
+
if (r8(
|
|
5439
5439
|
l.value,
|
|
5440
5440
|
e.elements,
|
|
5441
5441
|
e.scrollX,
|
|
@@ -5449,7 +5449,7 @@ const v8 = { key: 0 }, m8 = { key: 1 }, g8 = /* @__PURE__ */ J2({
|
|
|
5449
5449
|
t.appState.showGrid ? t.appState.gridType : "none",
|
|
5450
5450
|
I2.value,
|
|
5451
5451
|
t.appState.viewBackgroundColor
|
|
5452
|
-
), e6.value.length > 0 &&
|
|
5452
|
+
), e6.value.length > 0 && h8(
|
|
5453
5453
|
l.value,
|
|
5454
5454
|
e6.value,
|
|
5455
5455
|
t.appState.zoom,
|
|
@@ -5658,7 +5658,7 @@ const v8 = { key: 0 }, m8 = { key: 1 }, g8 = /* @__PURE__ */ J2({
|
|
|
5658
5658
|
t.saveToLocalStorage();
|
|
5659
5659
|
}, { detached: !0 });
|
|
5660
5660
|
}), M6(() => t.elements, () => {
|
|
5661
|
-
}), (f, b) => (A(), R("div",
|
|
5661
|
+
}), (f, b) => (A(), R("div", b8, [
|
|
5662
5662
|
g("canvas", {
|
|
5663
5663
|
id: "canvas-container",
|
|
5664
5664
|
ref_key: "canvas",
|
|
@@ -5671,8 +5671,8 @@ const v8 = { key: 0 }, m8 = { key: 1 }, g8 = /* @__PURE__ */ J2({
|
|
|
5671
5671
|
onPointerup: F1,
|
|
5672
5672
|
onDblclick: C2,
|
|
5673
5673
|
onContextmenu: F6(u, ["prevent"])
|
|
5674
|
-
}, null, 44,
|
|
5675
|
-
s2(
|
|
5674
|
+
}, null, 44, w8),
|
|
5675
|
+
s2(x8, {
|
|
5676
5676
|
visible: P2.value.visible,
|
|
5677
5677
|
x: P2.value.x,
|
|
5678
5678
|
y: P2.value.y,
|
|
@@ -5711,7 +5711,7 @@ const v8 = { key: 0 }, m8 = { key: 1 }, g8 = /* @__PURE__ */ J2({
|
|
|
5711
5711
|
], 4)
|
|
5712
5712
|
], 512));
|
|
5713
5713
|
}
|
|
5714
|
-
}),
|
|
5714
|
+
}), k8 = /* @__PURE__ */ i6(z8, [["__scopeId", "data-v-fcfe0b1a"]]), M8 = { class: "color-box" }, F8 = ["onClick"], S8 = /* @__PURE__ */ J2({
|
|
5715
5715
|
__name: "colorStyle",
|
|
5716
5716
|
props: {
|
|
5717
5717
|
modelValue: {},
|
|
@@ -5745,7 +5745,7 @@ const v8 = { key: 0 }, m8 = { key: 1 }, g8 = /* @__PURE__ */ J2({
|
|
|
5745
5745
|
]), s = function(n) {
|
|
5746
5746
|
t.value = n, l("colorChange", n);
|
|
5747
5747
|
};
|
|
5748
|
-
return (n, o) => (A(), R("div",
|
|
5748
|
+
return (n, o) => (A(), R("div", M8, [
|
|
5749
5749
|
g("div", {
|
|
5750
5750
|
class: $2(["trans-icon", { active: t.value === "transparent" }]),
|
|
5751
5751
|
onClick: o[0] || (o[0] = (c) => s("transparent"))
|
|
@@ -5759,7 +5759,7 @@ const v8 = { key: 0 }, m8 = { key: 1 }, g8 = /* @__PURE__ */ J2({
|
|
|
5759
5759
|
class: $2(["color-item", { active: t.value === c }]),
|
|
5760
5760
|
style: G2({ background: c }),
|
|
5761
5761
|
onClick: (u) => s(c)
|
|
5762
|
-
}, null, 14,
|
|
5762
|
+
}, null, 14, F8))), 128)),
|
|
5763
5763
|
o[2] || (o[2] = g("div", { class: "color-item-add" }, [
|
|
5764
5764
|
g("svg", { class: "svg-icon" }, [
|
|
5765
5765
|
g("use", { "xlink:href": "#icon-tianjiayanse" })
|
|
@@ -5767,17 +5767,17 @@ const v8 = { key: 0 }, m8 = { key: 1 }, g8 = /* @__PURE__ */ J2({
|
|
|
5767
5767
|
], -1))
|
|
5768
5768
|
]));
|
|
5769
5769
|
}
|
|
5770
|
-
}), Z6 = /* @__PURE__ */
|
|
5770
|
+
}), Z6 = /* @__PURE__ */ i6(S8, [["__scopeId", "data-v-9b04b94a"]]), C8 = { class: "menu-list" }, B8 = { class: "preferences-list" }, I8 = { class: "preferences-list grid-list" }, E8 = ["onClick"], T8 = { class: "svg-icon" }, H8 = ["xlink:href"], L8 = {
|
|
5771
5771
|
class: "preferences-list",
|
|
5772
5772
|
style: { padding: "12px", display: "flex", "justify-content": "center" }
|
|
5773
|
-
},
|
|
5773
|
+
}, V8 = { class: "preference-item" }, D8 = { class: "preference-info" }, P8 = { class: "preference-title" }, A8 = { class: "preference-item" }, _8 = { class: "preference-info" }, $8 = { class: "preference-title" }, j8 = {
|
|
5774
5774
|
key: 1,
|
|
5775
5775
|
class: "board-name-input",
|
|
5776
5776
|
style: { width: "195px", padding: "1px 23px 5px" }
|
|
5777
|
-
},
|
|
5777
|
+
}, O8 = /* @__PURE__ */ J2({
|
|
5778
5778
|
__name: "BoardName",
|
|
5779
5779
|
setup(i) {
|
|
5780
|
-
const e =
|
|
5780
|
+
const e = a6(), t = N(!1), l = N(), a = N("");
|
|
5781
5781
|
N("");
|
|
5782
5782
|
const s = Q(() => e.appState.isDraggingElement || e.appState.isBoxSelecting), n = N(), o = N([
|
|
5783
5783
|
{
|
|
@@ -5826,7 +5826,7 @@ const v8 = { key: 0 }, m8 = { key: 1 }, g8 = /* @__PURE__ */ J2({
|
|
|
5826
5826
|
c.value = m.value;
|
|
5827
5827
|
}
|
|
5828
5828
|
return (m, p) => {
|
|
5829
|
-
const M =
|
|
5829
|
+
const M = n6("el-popover"), k = n6("el-switch"), C = n6("el-input");
|
|
5830
5830
|
return A(), R("div", {
|
|
5831
5831
|
class: "board-name-container",
|
|
5832
5832
|
style: G2({ pointerEvents: s.value ? "none" : "auto" })
|
|
@@ -5849,7 +5849,7 @@ const v8 = { key: 0 }, m8 = { key: 1 }, g8 = /* @__PURE__ */ J2({
|
|
|
5849
5849
|
], -1)
|
|
5850
5850
|
])]),
|
|
5851
5851
|
default: L2(() => [
|
|
5852
|
-
g("div",
|
|
5852
|
+
g("div", C8, [
|
|
5853
5853
|
s2(M, {
|
|
5854
5854
|
placement: "right-start",
|
|
5855
5855
|
trigger: "click",
|
|
@@ -5881,7 +5881,7 @@ const v8 = { key: 0 }, m8 = { key: 1 }, g8 = /* @__PURE__ */ J2({
|
|
|
5881
5881
|
], -1)
|
|
5882
5882
|
])]),
|
|
5883
5883
|
default: L2(() => [
|
|
5884
|
-
g("div",
|
|
5884
|
+
g("div", B8, [
|
|
5885
5885
|
s2(M, {
|
|
5886
5886
|
placement: "right-start",
|
|
5887
5887
|
trigger: "click",
|
|
@@ -5913,19 +5913,19 @@ const v8 = { key: 0 }, m8 = { key: 1 }, g8 = /* @__PURE__ */ J2({
|
|
|
5913
5913
|
], -1)
|
|
5914
5914
|
])]),
|
|
5915
5915
|
default: L2(() => [
|
|
5916
|
-
g("div",
|
|
5916
|
+
g("div", I8, [
|
|
5917
5917
|
(A(!0), R(Y2, null, h6(o.value, (q, I) => (A(), R("div", {
|
|
5918
5918
|
key: I,
|
|
5919
5919
|
class: $2(["grid-item", { active: q.value === c.value }]),
|
|
5920
5920
|
onClick: (j) => d(q)
|
|
5921
5921
|
}, [
|
|
5922
|
-
(A(), R("svg",
|
|
5922
|
+
(A(), R("svg", T8, [
|
|
5923
5923
|
g("use", {
|
|
5924
5924
|
"xlink:href": `#${q.value === c.value ? q.activeIcon : q.icon}`
|
|
5925
|
-
}, null, 8,
|
|
5925
|
+
}, null, 8, H8)
|
|
5926
5926
|
])),
|
|
5927
5927
|
g("div", null, l6(q.label), 1)
|
|
5928
|
-
], 10,
|
|
5928
|
+
], 10, E8))), 128))
|
|
5929
5929
|
])
|
|
5930
5930
|
]),
|
|
5931
5931
|
_: 1
|
|
@@ -5961,7 +5961,7 @@ const v8 = { key: 0 }, m8 = { key: 1 }, g8 = /* @__PURE__ */ J2({
|
|
|
5961
5961
|
], -1)
|
|
5962
5962
|
])]),
|
|
5963
5963
|
default: L2(() => [
|
|
5964
|
-
g("div",
|
|
5964
|
+
g("div", L8, [
|
|
5965
5965
|
p[8] || (p[8] = g("div", { class: "title" }, "背景颜色", -1)),
|
|
5966
5966
|
s2(Z6, {
|
|
5967
5967
|
modelValue: m2(e).appState.viewBackgroundColor,
|
|
@@ -5972,9 +5972,9 @@ const v8 = { key: 0 }, m8 = { key: 1 }, g8 = /* @__PURE__ */ J2({
|
|
|
5972
5972
|
_: 1
|
|
5973
5973
|
}),
|
|
5974
5974
|
p[13] || (p[13] = g("div", { class: "line" }, null, -1)),
|
|
5975
|
-
g("div",
|
|
5976
|
-
g("div",
|
|
5977
|
-
g("div",
|
|
5975
|
+
g("div", V8, [
|
|
5976
|
+
g("div", D8, [
|
|
5977
|
+
g("div", P8, [
|
|
5978
5978
|
p[9] || (p[9] = g("div", null, "使用滚轮缩放画布", -1)),
|
|
5979
5979
|
s2(k, {
|
|
5980
5980
|
modelValue: m2(e).appState.useWheelZoom,
|
|
@@ -5985,9 +5985,9 @@ const v8 = { key: 0 }, m8 = { key: 1 }, g8 = /* @__PURE__ */ J2({
|
|
|
5985
5985
|
p[10] || (p[10] = g("div", { class: "preference-desc" }, "开启后,可通过鼠标滚轮进行缩放画布", -1))
|
|
5986
5986
|
])
|
|
5987
5987
|
]),
|
|
5988
|
-
g("div",
|
|
5989
|
-
g("div",
|
|
5990
|
-
g("div",
|
|
5988
|
+
g("div", A8, [
|
|
5989
|
+
g("div", _8, [
|
|
5990
|
+
g("div", $8, [
|
|
5991
5991
|
p[11] || (p[11] = g("div", null, " 右键拖拽平移画布 ", -1)),
|
|
5992
5992
|
s2(k, {
|
|
5993
5993
|
modelValue: m2(e).appState.rightClickPan,
|
|
@@ -6029,7 +6029,7 @@ const v8 = { key: 0 }, m8 = { key: 1 }, g8 = /* @__PURE__ */ J2({
|
|
|
6029
6029
|
class: "board-name-input",
|
|
6030
6030
|
placeholder: "Untitled Document",
|
|
6031
6031
|
onBlur: u
|
|
6032
|
-
}, null, 8, ["modelValue"])) : (A(), R("div",
|
|
6032
|
+
}, null, 8, ["modelValue"])) : (A(), R("div", j8, l6(a.value), 1)),
|
|
6033
6033
|
t.value ? p2("", !0) : (A(), R("div", {
|
|
6034
6034
|
key: 2,
|
|
6035
6035
|
class: "action-item",
|
|
@@ -6042,19 +6042,19 @@ const v8 = { key: 0 }, m8 = { key: 1 }, g8 = /* @__PURE__ */ J2({
|
|
|
6042
6042
|
], 4);
|
|
6043
6043
|
};
|
|
6044
6044
|
}
|
|
6045
|
-
}),
|
|
6045
|
+
}), R8 = /* @__PURE__ */ i6(O8, [["__scopeId", "data-v-59262e76"]]), X8 = {
|
|
6046
6046
|
key: 0,
|
|
6047
6047
|
class: "history-controls glass"
|
|
6048
|
-
},
|
|
6048
|
+
}, Y8 = { class: "svg-icon" }, Q8 = ["xlink:href"], Z8 = { class: "svg-icon" }, W8 = ["xlink:href"], U8 = { class: "zoom-controls glass" }, G8 = {
|
|
6049
6049
|
key: 1,
|
|
6050
6050
|
class: "separator"
|
|
6051
|
-
},
|
|
6051
|
+
}, N8 = {
|
|
6052
6052
|
key: 2,
|
|
6053
6053
|
class: "separator"
|
|
6054
|
-
},
|
|
6054
|
+
}, K8 = /* @__PURE__ */ J2({
|
|
6055
6055
|
__name: "Footer",
|
|
6056
6056
|
setup(i) {
|
|
6057
|
-
const e =
|
|
6057
|
+
const e = a6(), t = () => {
|
|
6058
6058
|
G0.confirm(
|
|
6059
6059
|
"确定要清空画布吗?",
|
|
6060
6060
|
"提示",
|
|
@@ -6082,29 +6082,29 @@ const v8 = { key: 0 }, m8 = { key: 1 }, g8 = /* @__PURE__ */ J2({
|
|
|
6082
6082
|
pointerEvents: l.value ? "none" : "auto"
|
|
6083
6083
|
})
|
|
6084
6084
|
}, [
|
|
6085
|
-
m2(e).appConfig.editable !== !1 ? (A(), R("div",
|
|
6085
|
+
m2(e).appConfig.editable !== !1 ? (A(), R("div", X8, [
|
|
6086
6086
|
g("div", {
|
|
6087
6087
|
onClick: a,
|
|
6088
6088
|
class: $2(["tool-item", { disabled: m2(e).historyStep <= 0 }])
|
|
6089
6089
|
}, [
|
|
6090
|
-
(A(), R("svg",
|
|
6090
|
+
(A(), R("svg", Y8, [
|
|
6091
6091
|
g("use", {
|
|
6092
6092
|
"xlink:href": `${m2(e).historyStep <= 0 ? "#icon-chexiao-copy" : "#icon-chexiao"}`
|
|
6093
|
-
}, null, 8,
|
|
6093
|
+
}, null, 8, Q8)
|
|
6094
6094
|
]))
|
|
6095
6095
|
], 2),
|
|
6096
6096
|
g("div", {
|
|
6097
6097
|
onClick: s,
|
|
6098
6098
|
class: $2(["tool-item", { disabled: m2(e).historyStep >= m2(e).history.length - 1 }])
|
|
6099
6099
|
}, [
|
|
6100
|
-
(A(), R("svg",
|
|
6100
|
+
(A(), R("svg", Z8, [
|
|
6101
6101
|
g("use", {
|
|
6102
6102
|
"xlink:href": `${m2(e).historyStep >= m2(e).history.length - 1 ? "#icon-huifu-copy" : "#icon-huifu"}`
|
|
6103
|
-
}, null, 8,
|
|
6103
|
+
}, null, 8, W8)
|
|
6104
6104
|
]))
|
|
6105
6105
|
], 2)
|
|
6106
6106
|
])) : p2("", !0),
|
|
6107
|
-
g("div",
|
|
6107
|
+
g("div", U8, [
|
|
6108
6108
|
m2(e).appConfig.editable !== !1 ? (A(), R("div", {
|
|
6109
6109
|
key: 0,
|
|
6110
6110
|
class: $2(["tool-item", { active: m2(e).appState.activeTool === "hand" }]),
|
|
@@ -6114,7 +6114,7 @@ const v8 = { key: 0 }, m8 = { key: 1 }, g8 = /* @__PURE__ */ J2({
|
|
|
6114
6114
|
g("use", { "xlink:href": "#icon-yidong" })
|
|
6115
6115
|
], -1)
|
|
6116
6116
|
])], 2)) : p2("", !0),
|
|
6117
|
-
m2(e).appConfig.editable !== !1 ? (A(), R("div",
|
|
6117
|
+
m2(e).appConfig.editable !== !1 ? (A(), R("div", G8)) : p2("", !0),
|
|
6118
6118
|
g("div", {
|
|
6119
6119
|
onClick: c[1] || (c[1] = (r) => m2(e).zoomOut()),
|
|
6120
6120
|
class: "tool-item"
|
|
@@ -6136,7 +6136,7 @@ const v8 = { key: 0 }, m8 = { key: 1 }, g8 = /* @__PURE__ */ J2({
|
|
|
6136
6136
|
g("use", { "xlink:href": "#icon-fangda" })
|
|
6137
6137
|
], -1)
|
|
6138
6138
|
])]),
|
|
6139
|
-
m2(e).appConfig.editable !== !1 ? (A(), R("div",
|
|
6139
|
+
m2(e).appConfig.editable !== !1 ? (A(), R("div", N8)) : p2("", !0),
|
|
6140
6140
|
m2(e).appConfig.editable !== !1 ? (A(), R("div", {
|
|
6141
6141
|
key: 3,
|
|
6142
6142
|
class: $2(["tool-item", { active: m2(e).appState.viewLocked }]),
|
|
@@ -6158,10 +6158,10 @@ const v8 = { key: 0 }, m8 = { key: 1 }, g8 = /* @__PURE__ */ J2({
|
|
|
6158
6158
|
])
|
|
6159
6159
|
], 4));
|
|
6160
6160
|
}
|
|
6161
|
-
}),
|
|
6161
|
+
}), J8 = /* @__PURE__ */ i6(K8, [["__scopeId", "data-v-5c7ecc49"]]), t5 = /* @__PURE__ */ J2({
|
|
6162
6162
|
__name: "HelpDialog",
|
|
6163
6163
|
setup(i) {
|
|
6164
|
-
const e =
|
|
6164
|
+
const e = a6(), t = () => {
|
|
6165
6165
|
e.appState.showHelp = !1;
|
|
6166
6166
|
};
|
|
6167
6167
|
return (l, a) => m2(e).appState.showHelp ? (A(), R("div", {
|
|
@@ -6184,43 +6184,43 @@ const v8 = { key: 0 }, m8 = { key: 1 }, g8 = /* @__PURE__ */ J2({
|
|
|
6184
6184
|
])
|
|
6185
6185
|
], 4)) : p2("", !0);
|
|
6186
6186
|
}
|
|
6187
|
-
}),
|
|
6187
|
+
}), e5 = /* @__PURE__ */ i6(t5, [["__scopeId", "data-v-0caac542"]]), l5 = { class: "popovers-container" }, a5 = { class: "popover-content" }, i5 = { class: "sub-tools-container" }, n5 = ["onClick"], s5 = { class: "svg-icon" }, o5 = ["xlink:href"], c5 = {
|
|
6188
6188
|
key: 1,
|
|
6189
6189
|
class: "divider"
|
|
6190
|
-
},
|
|
6190
|
+
}, r5 = {
|
|
6191
6191
|
class: "settings-btn",
|
|
6192
6192
|
title: "背景颜色"
|
|
6193
|
-
},
|
|
6193
|
+
}, d5 = {
|
|
6194
6194
|
key: 0,
|
|
6195
6195
|
class: "svg-icon"
|
|
6196
|
-
},
|
|
6196
|
+
}, h5 = { class: "popover-content" }, p5 = ["title"], u5 = {
|
|
6197
6197
|
key: 0,
|
|
6198
6198
|
class: "svg-icon"
|
|
6199
|
-
},
|
|
6199
|
+
}, f5 = {
|
|
6200
6200
|
key: 1,
|
|
6201
6201
|
class: "svg-icon"
|
|
6202
|
-
},
|
|
6202
|
+
}, v5 = ["xlink:href"], m5 = { class: "popover-content" }, g5 = { class: "title" }, y5 = { class: "title" }, x5 = { class: "title" }, b5 = { class: "title" }, w5 = {
|
|
6203
6203
|
key: 4,
|
|
6204
6204
|
class: "divider"
|
|
6205
|
-
},
|
|
6205
|
+
}, q5 = {
|
|
6206
6206
|
class: "settings-btn",
|
|
6207
6207
|
title: "箭头颜色"
|
|
6208
|
-
},
|
|
6208
|
+
}, z5 = {
|
|
6209
6209
|
key: 0,
|
|
6210
6210
|
class: "svg-icon"
|
|
6211
|
-
},
|
|
6211
|
+
}, k5 = { class: "popover-content" }, M5 = { class: "popover-content" }, F5 = {
|
|
6212
6212
|
key: 7,
|
|
6213
6213
|
class: "divider"
|
|
6214
|
-
},
|
|
6214
|
+
}, S5 = {
|
|
6215
6215
|
class: "settings-btn",
|
|
6216
6216
|
title: "文本颜色"
|
|
6217
|
-
},
|
|
6217
|
+
}, C5 = ["fill"], B5 = ["fill"], I5 = ["fill"], E5 = { class: "popover-content" }, T5 = {
|
|
6218
6218
|
key: 9,
|
|
6219
6219
|
class: "font-size-select"
|
|
6220
|
-
},
|
|
6220
|
+
}, H5 = /* @__PURE__ */ J2({
|
|
6221
6221
|
__name: "FloatingPopovers",
|
|
6222
6222
|
setup(i) {
|
|
6223
|
-
const e =
|
|
6223
|
+
const e = a6(), t = N(!1), l = N(!1), a = N(!1), s = N(!1), n = N(!1), o = N(!1), c = N(!1), r = N(null), u = N([
|
|
6224
6224
|
{ name: "rectangle", icon: "#icon-yuanjiaojuxing", label: "矩形", key: "2" },
|
|
6225
6225
|
{ name: "diamond", icon: "#icon-lingxing", label: "菱形", key: "3" },
|
|
6226
6226
|
{ name: "ellipse", icon: "#icon-tuoyuanxing", label: "椭圆", key: "4" },
|
|
@@ -6421,8 +6421,8 @@ const v8 = { key: 0 }, m8 = { key: 1 }, g8 = /* @__PURE__ */ J2({
|
|
|
6421
6421
|
e.updateSelectedElements({ type: P });
|
|
6422
6422
|
};
|
|
6423
6423
|
return (P, Y) => {
|
|
6424
|
-
const T2 =
|
|
6425
|
-
return A(), R("div",
|
|
6424
|
+
const T2 = n6("el-popover"), V2 = n6("el-slider"), w2 = n6("el-option"), j2 = n6("el-select");
|
|
6425
|
+
return A(), R("div", l5, [
|
|
6426
6426
|
C.value ? (A(), m6(T2, {
|
|
6427
6427
|
key: 0,
|
|
6428
6428
|
placement: "top",
|
|
@@ -6444,25 +6444,25 @@ const v8 = { key: 0 }, m8 = { key: 1 }, g8 = /* @__PURE__ */ J2({
|
|
|
6444
6444
|
], -1)
|
|
6445
6445
|
])]),
|
|
6446
6446
|
default: L2(() => [
|
|
6447
|
-
g("div",
|
|
6448
|
-
g("div",
|
|
6447
|
+
g("div", a5, [
|
|
6448
|
+
g("div", i5, [
|
|
6449
6449
|
(A(!0), R(Y2, null, h6(u.value, (d2) => (A(), R("div", {
|
|
6450
6450
|
key: d2.name,
|
|
6451
6451
|
class: $2(["sub-tool-item", { active: k() === d2.name }]),
|
|
6452
6452
|
onClick: (i1) => e6(d2.name)
|
|
6453
6453
|
}, [
|
|
6454
|
-
(A(), R("svg",
|
|
6454
|
+
(A(), R("svg", s5, [
|
|
6455
6455
|
g("use", {
|
|
6456
6456
|
"xlink:href": `${d2.icon}`
|
|
6457
|
-
}, null, 8,
|
|
6457
|
+
}, null, 8, o5)
|
|
6458
6458
|
]))
|
|
6459
|
-
], 10,
|
|
6459
|
+
], 10, n5))), 128))
|
|
6460
6460
|
])
|
|
6461
6461
|
])
|
|
6462
6462
|
]),
|
|
6463
6463
|
_: 1
|
|
6464
6464
|
}, 8, ["visible"])) : p2("", !0),
|
|
6465
|
-
C.value ? (A(), R("div",
|
|
6465
|
+
C.value ? (A(), R("div", c5)) : p2("", !0),
|
|
6466
6466
|
q.value ? (A(), m6(T2, {
|
|
6467
6467
|
key: 2,
|
|
6468
6468
|
placement: "top",
|
|
@@ -6474,8 +6474,8 @@ const v8 = { key: 0 }, m8 = { key: 1 }, g8 = /* @__PURE__ */ J2({
|
|
|
6474
6474
|
"onUpdate:visible": Y[3] || (Y[3] = (d2) => t.value = d2)
|
|
6475
6475
|
}, {
|
|
6476
6476
|
reference: L2(() => [
|
|
6477
|
-
g("div",
|
|
6478
|
-
W.value == "transparent" || !W.value ? (A(), R("svg",
|
|
6477
|
+
g("div", r5, [
|
|
6478
|
+
W.value == "transparent" || !W.value ? (A(), R("svg", d5, [...Y[16] || (Y[16] = [
|
|
6479
6479
|
g("use", { "xlink:href": "#icon-wuyanse" }, null, -1)
|
|
6480
6480
|
])])) : (A(), R("div", {
|
|
6481
6481
|
key: 1,
|
|
@@ -6485,7 +6485,7 @@ const v8 = { key: 0 }, m8 = { key: 1 }, g8 = /* @__PURE__ */ J2({
|
|
|
6485
6485
|
])
|
|
6486
6486
|
]),
|
|
6487
6487
|
default: L2(() => [
|
|
6488
|
-
g("div",
|
|
6488
|
+
g("div", h5, [
|
|
6489
6489
|
Y[17] || (Y[17] = g("div", { class: "title" }, "填充样式", -1)),
|
|
6490
6490
|
s2(M0),
|
|
6491
6491
|
Y[18] || (Y[18] = g("div", { class: "title" }, "透明度", -1)),
|
|
@@ -6522,29 +6522,29 @@ const v8 = { key: 0 }, m8 = { key: 1 }, g8 = /* @__PURE__ */ J2({
|
|
|
6522
6522
|
title: k() == "arrow" ? "箭头" : "边框"
|
|
6523
6523
|
}, [
|
|
6524
6524
|
k() !== "arrow" && k() !== "line" ? (A(), R(Y2, { key: 0 }, [
|
|
6525
|
-
t2.value == "transparent" || !t2.value ? (A(), R("svg",
|
|
6525
|
+
t2.value == "transparent" || !t2.value ? (A(), R("svg", u5, [...Y[20] || (Y[20] = [
|
|
6526
6526
|
g("use", { "xlink:href": "#icon-wubiankuang" }, null, -1)
|
|
6527
6527
|
])])) : (A(), R("div", {
|
|
6528
6528
|
key: 1,
|
|
6529
6529
|
class: "border-box",
|
|
6530
6530
|
style: G2({ borderColor: t2.value })
|
|
6531
6531
|
}, null, 4))
|
|
6532
|
-
], 64)) : (A(), R("svg",
|
|
6532
|
+
], 64)) : (A(), R("svg", f5, [
|
|
6533
6533
|
g("use", {
|
|
6534
6534
|
"xlink:href": `#${k() == "line" ? "icon-zhixian" : i2.value == "sharp" ? "icon-zhixianlianjiexian" : "icon-quxian"}`
|
|
6535
|
-
}, null, 8,
|
|
6535
|
+
}, null, 8, v5)
|
|
6536
6536
|
]))
|
|
6537
|
-
], 8,
|
|
6537
|
+
], 8, p5)
|
|
6538
6538
|
]),
|
|
6539
6539
|
default: L2(() => [
|
|
6540
|
-
g("div",
|
|
6540
|
+
g("div", m5, [
|
|
6541
6541
|
j.value ? (A(), R(Y2, { key: 0 }, [
|
|
6542
|
-
g("div",
|
|
6542
|
+
g("div", g5, l6(["arrow", "line"].includes(k()) ? "线条" : "描边") + "样式", 1),
|
|
6543
6543
|
s2(F0)
|
|
6544
6544
|
], 64)) : p2("", !0),
|
|
6545
6545
|
Y[22] || (Y[22] = g("div", { class: "title" }, "线条风格", -1)),
|
|
6546
6546
|
s2(S0),
|
|
6547
|
-
g("div",
|
|
6547
|
+
g("div", y5, l6(["arrow", "line"].includes(k()) ? "线条" : "描边") + "粗细", 1),
|
|
6548
6548
|
s2(V2, {
|
|
6549
6549
|
modelValue: e2.value,
|
|
6550
6550
|
"onUpdate:modelValue": Y[4] || (Y[4] = (d2) => e2.value = d2),
|
|
@@ -6553,7 +6553,7 @@ const v8 = { key: 0 }, m8 = { key: 1 }, g8 = /* @__PURE__ */ J2({
|
|
|
6553
6553
|
min: 1,
|
|
6554
6554
|
max: 10
|
|
6555
6555
|
}, null, 8, ["modelValue"]),
|
|
6556
|
-
g("div",
|
|
6556
|
+
g("div", x5, l6(["arrow", "line"].includes(k()) ? "" : "描边") + "透明度", 1),
|
|
6557
6557
|
s2(V2, {
|
|
6558
6558
|
modelValue: U.value,
|
|
6559
6559
|
"onUpdate:modelValue": Y[5] || (Y[5] = (d2) => U.value = d2),
|
|
@@ -6570,14 +6570,14 @@ const v8 = { key: 0 }, m8 = { key: 1 }, g8 = /* @__PURE__ */ J2({
|
|
|
6570
6570
|
}, null, 8, ["modelValue"])
|
|
6571
6571
|
], 64)),
|
|
6572
6572
|
o2.value ? (A(), R(Y2, { key: 2 }, [
|
|
6573
|
-
g("div",
|
|
6573
|
+
g("div", b5, l6(k() == "arrow" ? "箭头" : "线条") + "类型", 1),
|
|
6574
6574
|
s2(I0)
|
|
6575
6575
|
], 64)) : p2("", !0)
|
|
6576
6576
|
])
|
|
6577
6577
|
]),
|
|
6578
6578
|
_: 1
|
|
6579
6579
|
}, 8, ["visible"])) : p2("", !0),
|
|
6580
|
-
o2.value ? (A(), R("div",
|
|
6580
|
+
o2.value ? (A(), R("div", w5)) : p2("", !0),
|
|
6581
6581
|
o2.value ? (A(), m6(T2, {
|
|
6582
6582
|
key: 5,
|
|
6583
6583
|
placement: "top",
|
|
@@ -6589,8 +6589,8 @@ const v8 = { key: 0 }, m8 = { key: 1 }, g8 = /* @__PURE__ */ J2({
|
|
|
6589
6589
|
"onUpdate:visible": Y[9] || (Y[9] = (d2) => a.value = d2)
|
|
6590
6590
|
}, {
|
|
6591
6591
|
reference: L2(() => [
|
|
6592
|
-
g("div",
|
|
6593
|
-
t2.value == "transparent" || !t2.value ? (A(), R("svg",
|
|
6592
|
+
g("div", q5, [
|
|
6593
|
+
t2.value == "transparent" || !t2.value ? (A(), R("svg", z5, [...Y[23] || (Y[23] = [
|
|
6594
6594
|
g("use", { "xlink:href": "#icon-wuyanse" }, null, -1)
|
|
6595
6595
|
])])) : (A(), R("div", {
|
|
6596
6596
|
key: 1,
|
|
@@ -6600,7 +6600,7 @@ const v8 = { key: 0 }, m8 = { key: 1 }, g8 = /* @__PURE__ */ J2({
|
|
|
6600
6600
|
])
|
|
6601
6601
|
]),
|
|
6602
6602
|
default: L2(() => [
|
|
6603
|
-
g("div",
|
|
6603
|
+
g("div", k5, [
|
|
6604
6604
|
Y[24] || (Y[24] = g("div", { class: "title" }, [
|
|
6605
6605
|
g("span", null, "默认颜色")
|
|
6606
6606
|
], -1)),
|
|
@@ -6631,7 +6631,7 @@ const v8 = { key: 0 }, m8 = { key: 1 }, g8 = /* @__PURE__ */ J2({
|
|
|
6631
6631
|
], -1)
|
|
6632
6632
|
])]),
|
|
6633
6633
|
default: L2(() => [
|
|
6634
|
-
g("div",
|
|
6634
|
+
g("div", M5, [
|
|
6635
6635
|
Y[26] || (Y[26] = g("div", { class: "title" }, "圆角", -1)),
|
|
6636
6636
|
s2(V2, {
|
|
6637
6637
|
modelValue: b2.value,
|
|
@@ -6645,7 +6645,7 @@ const v8 = { key: 0 }, m8 = { key: 1 }, g8 = /* @__PURE__ */ J2({
|
|
|
6645
6645
|
]),
|
|
6646
6646
|
_: 1
|
|
6647
6647
|
})) : p2("", !0),
|
|
6648
|
-
a2.value && q.value ? (A(), R("div",
|
|
6648
|
+
a2.value && q.value ? (A(), R("div", F5)) : p2("", !0),
|
|
6649
6649
|
a2.value ? (A(), m6(T2, {
|
|
6650
6650
|
key: 8,
|
|
6651
6651
|
placement: "top",
|
|
@@ -6657,7 +6657,7 @@ const v8 = { key: 0 }, m8 = { key: 1 }, g8 = /* @__PURE__ */ J2({
|
|
|
6657
6657
|
"onUpdate:visible": Y[13] || (Y[13] = (d2) => n.value = d2)
|
|
6658
6658
|
}, {
|
|
6659
6659
|
reference: L2(() => [
|
|
6660
|
-
g("div",
|
|
6660
|
+
g("div", S5, [
|
|
6661
6661
|
(A(), R("svg", {
|
|
6662
6662
|
class: "svg-icon",
|
|
6663
6663
|
viewBox: "0 0 1024 1024",
|
|
@@ -6667,22 +6667,22 @@ const v8 = { key: 0 }, m8 = { key: 1 }, g8 = /* @__PURE__ */ J2({
|
|
|
6667
6667
|
d: "M772.144762 747.52L566.369524 223.817143a24.137143 24.137143 0 0 0-24.380953-16.579048H484.449524c-11.702857 0-19.992381 5.36381-24.380953 16.579048L254.293333 747.52c-6.339048 16.579048-4.87619 32.182857 5.36381 46.811429 10.24 14.628571 23.893333 21.942857 41.935238 21.942857 22.918095 0 38.521905-10.727619 47.299048-32.182857l48.761904-123.855239h232.106667l48.761905 123.855239c8.289524 21.455238 23.893333 32.182857 46.811428 32.182857 18.041905 0 31.695238-7.314286 41.935238-21.942857 10.24-14.628571 11.702857-30.232381 5.36381-46.811429h-0.487619z m-25.356191 33.645714c-5.36381 7.801905-12.190476 11.215238-21.455238 11.215238-11.702857 0-19.992381-5.36381-24.380952-16.579047l-49.737143-126.780953a18.870857 18.870857 0 0 0-18.529524-12.678095H394.727619c-9.264762 0-15.60381 4.388571-18.529524 12.678095l-49.737143 126.780953c-4.388571 11.215238-12.678095 16.579048-24.380952 16.579047-9.264762 0-16.579048-3.900952-21.942857-11.702857a24.380952 24.380952 0 0 1-2.925714-24.380952L482.986667 232.594286s0.975238-0.975238 1.950476-0.975238h57.539047s1.462857 0 1.950477 0.975238l205.775238 523.702857a24.380952 24.380952 0 0 1-2.925715 24.380952l-0.487619 0.487619z",
|
|
6668
6668
|
fill: u2.value == "transparent" ? "#EEEFF0" : u2.value,
|
|
6669
6669
|
"p-id": "4210"
|
|
6670
|
-
}, null, 8,
|
|
6670
|
+
}, null, 8, C5),
|
|
6671
6671
|
g("path", {
|
|
6672
6672
|
d: "M529.310476 338.895238c-2.925714-7.314286-8.289524-10.727619-16.091428-10.727619s-13.165714 3.413333-16.091429 10.727619l-86.79619 220.40381c-2.438095 5.36381-1.462857 10.727619 1.950476 16.091428 3.413333 4.87619 8.289524 7.314286 14.140952 7.314286h173.104762c5.851429 0 10.727619-2.438095 14.140952-7.314286 3.413333-4.87619 3.900952-10.24 1.950477-16.091428l-86.308572-220.40381z m-91.672381 219.428572l76.068572-193.097143 75.580952 193.097143H437.638095z",
|
|
6673
6673
|
fill: u2.value == "transparent" ? "#EEEFF0" : u2.value,
|
|
6674
6674
|
"p-id": "4211"
|
|
6675
|
-
}, null, 8,
|
|
6675
|
+
}, null, 8, B5),
|
|
6676
6676
|
g("path", {
|
|
6677
6677
|
d: "M700.952381 775.801905c4.388571 11.215238 12.678095 16.579048 24.380952 16.579047 9.264762 0 16.579048-3.900952 21.455238-11.215238a24.380952 24.380952 0 0 0 2.925715-24.380952L543.939048 233.081905s-0.975238-0.975238-1.950477-0.975238H484.449524s-1.462857 0-1.950476 0.975238L276.72381 756.784762a24.380952 24.380952 0 0 0 2.925714 24.380952c5.36381 7.801905 12.678095 11.702857 21.942857 11.702857 11.702857 0 19.992381-5.36381 24.380952-16.579047l49.737143-126.780953c3.413333-8.289524 9.752381-12.678095 18.529524-12.678095h237.958095c9.264762 0 15.60381 4.388571 18.529524 12.678095l49.737143 126.780953 0.487619-0.487619z m-274.529524-193.097143c-5.851429 0-10.727619-2.438095-14.140952-7.314286a17.066667 17.066667 0 0 1-1.950476-16.091428l86.79619-220.40381c2.925714-7.314286 8.289524-10.727619 16.091429-10.727619s13.165714 3.413333 16.091428 10.727619l86.308572 220.40381c2.438095 5.36381 1.462857 10.727619-1.950477 16.091428-3.413333 4.87619-8.289524 7.314286-14.140952 7.314286H426.422857z",
|
|
6678
6678
|
fill: u2.value,
|
|
6679
6679
|
"p-id": "4212"
|
|
6680
|
-
}, null, 8,
|
|
6680
|
+
}, null, 8, I5)
|
|
6681
6681
|
], 4))
|
|
6682
6682
|
])
|
|
6683
6683
|
]),
|
|
6684
6684
|
default: L2(() => [
|
|
6685
|
-
g("div",
|
|
6685
|
+
g("div", E5, [
|
|
6686
6686
|
Y[27] || (Y[27] = g("div", { class: "title" }, [
|
|
6687
6687
|
g("span", null, "文本样式")
|
|
6688
6688
|
], -1)),
|
|
@@ -6709,7 +6709,7 @@ const v8 = { key: 0 }, m8 = { key: 1 }, g8 = /* @__PURE__ */ J2({
|
|
|
6709
6709
|
]),
|
|
6710
6710
|
_: 1
|
|
6711
6711
|
}, 8, ["visible"])) : p2("", !0),
|
|
6712
|
-
a2.value ? (A(), R("div",
|
|
6712
|
+
a2.value ? (A(), R("div", T5, [
|
|
6713
6713
|
s2(j2, {
|
|
6714
6714
|
modelValue: q2.value,
|
|
6715
6715
|
"onUpdate:modelValue": Y[14] || (Y[14] = (d2) => q2.value = d2),
|
|
@@ -6729,10 +6729,10 @@ const v8 = { key: 0 }, m8 = { key: 1 }, g8 = /* @__PURE__ */ J2({
|
|
|
6729
6729
|
]);
|
|
6730
6730
|
};
|
|
6731
6731
|
}
|
|
6732
|
-
}),
|
|
6732
|
+
}), L5 = /* @__PURE__ */ i6(H5, [["__scopeId", "data-v-1fe4c384"]]), V5 = {
|
|
6733
6733
|
key: 0,
|
|
6734
6734
|
class: "divider"
|
|
6735
|
-
},
|
|
6735
|
+
}, D5 = ["title"], P5 = { class: "svg-icon" }, A5 = ["xlink:href"], _5 = /* @__PURE__ */ J2({
|
|
6736
6736
|
__name: "FloatingPropertiesBar",
|
|
6737
6737
|
props: {
|
|
6738
6738
|
zoom: {},
|
|
@@ -6740,7 +6740,7 @@ const v8 = { key: 0 }, m8 = { key: 1 }, g8 = /* @__PURE__ */ J2({
|
|
|
6740
6740
|
scrollY: {}
|
|
6741
6741
|
},
|
|
6742
6742
|
setup(i) {
|
|
6743
|
-
const e = i, t =
|
|
6743
|
+
const e = i, t = a6(), l = N(!1), a = N({ x: 0, y: 0 });
|
|
6744
6744
|
M6(() => t.appState.selectedElementIds, () => {
|
|
6745
6745
|
t.appState.floatingToolbarOffset = { x: 0, y: 0 };
|
|
6746
6746
|
}, { deep: !0 });
|
|
@@ -6811,8 +6811,8 @@ const v8 = { key: 0 }, m8 = { key: 1 }, g8 = /* @__PURE__ */ J2({
|
|
|
6811
6811
|
g("use", { "xlink:href": "#icon-tuodong" })
|
|
6812
6812
|
], -1)
|
|
6813
6813
|
])], 32),
|
|
6814
|
-
!r.value && !u.value ? (A(), R("div",
|
|
6815
|
-
s2(
|
|
6814
|
+
!r.value && !u.value ? (A(), R("div", V5)) : p2("", !0),
|
|
6815
|
+
s2(L5),
|
|
6816
6816
|
Z[2] || (Z[2] = g("div", { class: "divider" }, null, -1)),
|
|
6817
6817
|
y.value ? (A(), R("div", {
|
|
6818
6818
|
key: 1,
|
|
@@ -6820,12 +6820,12 @@ const v8 = { key: 0 }, m8 = { key: 1 }, g8 = /* @__PURE__ */ J2({
|
|
|
6820
6820
|
onClick: F6(I, ["stop"]),
|
|
6821
6821
|
title: q.value ? "解除编组" : "编组"
|
|
6822
6822
|
}, [
|
|
6823
|
-
(A(), R("svg",
|
|
6823
|
+
(A(), R("svg", P5, [
|
|
6824
6824
|
g("use", {
|
|
6825
6825
|
"xlink:href": q.value ? "#icon-quxiaobianzu" : "#icon-bianzu"
|
|
6826
|
-
}, null, 8,
|
|
6826
|
+
}, null, 8, A5)
|
|
6827
6827
|
]))
|
|
6828
|
-
], 8,
|
|
6828
|
+
], 8, D5)) : p2("", !0),
|
|
6829
6829
|
g("div", {
|
|
6830
6830
|
class: "settings-btn",
|
|
6831
6831
|
onClick: F6(C, ["stop"]),
|
|
@@ -6837,7 +6837,7 @@ const v8 = { key: 0 }, m8 = { key: 1 }, g8 = /* @__PURE__ */ J2({
|
|
|
6837
6837
|
])])
|
|
6838
6838
|
], 4)) : p2("", !0);
|
|
6839
6839
|
}
|
|
6840
|
-
}),
|
|
6840
|
+
}), $5 = /* @__PURE__ */ i6(_5, [["__scopeId", "data-v-206d2632"]]), j5 = { class: "app-container" }, b0 = /* @__PURE__ */ J2({
|
|
6841
6841
|
__name: "App",
|
|
6842
6842
|
props: {
|
|
6843
6843
|
initialData: {
|
|
@@ -6850,7 +6850,7 @@ const v8 = { key: 0 }, m8 = { key: 1 }, g8 = /* @__PURE__ */ J2({
|
|
|
6850
6850
|
}
|
|
6851
6851
|
},
|
|
6852
6852
|
setup(i, { expose: e }) {
|
|
6853
|
-
const t = i, l =
|
|
6853
|
+
const t = i, l = a6();
|
|
6854
6854
|
t.initialData && (l.appConfig.initialData = t.initialData), t.loadFromLocal !== void 0 && (l.appConfig.loadFromLocal = t.loadFromLocal);
|
|
6855
6855
|
const a = () => {
|
|
6856
6856
|
const o = JSON.parse(JSON.stringify(l.elements)), c = JSON.parse(JSON.stringify(l.appState));
|
|
@@ -6862,28 +6862,28 @@ const v8 = { key: 0 }, m8 = { key: 1 }, g8 = /* @__PURE__ */ J2({
|
|
|
6862
6862
|
l.updateCanvasData(o);
|
|
6863
6863
|
},
|
|
6864
6864
|
setConfig: (o) => {
|
|
6865
|
-
o && Object.assign(l.appConfig, o);
|
|
6865
|
+
o && (l.appConfig = Object.assign(l.appConfig, o));
|
|
6866
6866
|
}
|
|
6867
6867
|
}), l1(() => {
|
|
6868
6868
|
l.recordHistory(), window.getExcalidrawCanvasData = a;
|
|
6869
|
-
}), (o, c) => (A(), R("div",
|
|
6870
|
-
m2(l).appConfig.showToolbar !== !1 && m2(l).appConfig.editable !== !1 ? (A(), m6(
|
|
6871
|
-
m2(l).appConfig.showPropertiesPanel !== !1 && m2(l).appConfig.editable !== !1 ? (A(), m6(
|
|
6872
|
-
m2(l).appConfig.showBoardName !== !1 && m2(l).appConfig.editable !== !1 ? (A(), m6(
|
|
6873
|
-
s2(
|
|
6869
|
+
}), (o, c) => (A(), R("div", j5, [
|
|
6870
|
+
m2(l).appConfig.showToolbar !== !1 && m2(l).appConfig.editable !== !1 ? (A(), m6(C4, { key: 0 })) : p2("", !0),
|
|
6871
|
+
m2(l).appConfig.showPropertiesPanel !== !1 && m2(l).appConfig.editable !== !1 ? (A(), m6(R3, { key: 1 })) : p2("", !0),
|
|
6872
|
+
m2(l).appConfig.showBoardName !== !1 && m2(l).appConfig.editable !== !1 ? (A(), m6(R8, { key: 2 })) : p2("", !0),
|
|
6873
|
+
s2(k8, {
|
|
6874
6874
|
elements: m2(l).elements,
|
|
6875
6875
|
zoom: m2(l).appState.zoom,
|
|
6876
6876
|
scrollX: m2(l).appState.scrollX,
|
|
6877
6877
|
scrollY: m2(l).appState.scrollY
|
|
6878
6878
|
}, null, 8, ["elements", "zoom", "scrollX", "scrollY"]),
|
|
6879
|
-
m2(l).appConfig.editable !== !1 ? (A(), m6(
|
|
6879
|
+
m2(l).appConfig.editable !== !1 ? (A(), m6($5, {
|
|
6880
6880
|
key: 3,
|
|
6881
6881
|
zoom: m2(l).appState.zoom,
|
|
6882
6882
|
scrollX: m2(l).appState.scrollX,
|
|
6883
6883
|
scrollY: m2(l).appState.scrollY
|
|
6884
6884
|
}, null, 8, ["zoom", "scrollX", "scrollY"])) : p2("", !0),
|
|
6885
|
-
m2(l).appConfig.showFooter !== !1 ? (A(), m6(
|
|
6886
|
-
s2(
|
|
6885
|
+
m2(l).appConfig.showFooter !== !1 ? (A(), m6(J8, { key: 4 })) : p2("", !0),
|
|
6886
|
+
s2(e5)
|
|
6887
6887
|
]));
|
|
6888
6888
|
}
|
|
6889
6889
|
});
|
|
@@ -6958,10 +6958,10 @@ window._iconfont_svg_string_4329770 = '<svg><symbol id="jvs-public-cvs" viewBox=
|
|
|
6958
6958
|
}
|
|
6959
6959
|
})(window);
|
|
6960
6960
|
b0.install = function(i, e) {
|
|
6961
|
-
e &&
|
|
6961
|
+
e && h4(e), i.component("JvsDraw", b0);
|
|
6962
6962
|
};
|
|
6963
6963
|
export {
|
|
6964
6964
|
b0 as JvsDraw,
|
|
6965
6965
|
b0 as default,
|
|
6966
|
-
|
|
6966
|
+
h4 as setConfig
|
|
6967
6967
|
};
|