@zhangqingcq/vgce 0.1.9 → 0.1.10
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/README.md +51 -13
- package/dist/style.css +1 -1
- package/dist/vgce.js +261 -250
- package/dist/vgce.umd.cjs +4 -4
- package/package.json +1 -1
- package/src/components/svg-editor/center-panel.vue +146 -147
- package/src/components/svg-editor/index.vue +5 -1
- package/src/components/svg-viewer.vue +68 -69
- package/src/views/EditorS.vue +21 -21
- package/src/views/Preview.vue +38 -38
package/dist/vgce.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { defineComponent, watch, openBlock, createBlock, unref, createElementBlock, createElementVNode, nextTick, normalizeStyle as normalizeStyle$1, toDisplayString, ref, watchEffect, normalizeProps, guardReactiveProps, withCtx, Fragment, renderList, mergeProps, computed, onMounted, onUnmounted, provide, reactive, getCurrentInstance, createVNode as createVNode$1, normalizeClass, isRef, pushScopeId, popScopeId, useCssVars, withDirectives, vShow, createCommentVNode, resolveDynamicComponent, createTextVNode, h, markRaw, capitalize, getCurrentScope, onScopeDispose, warn as warn$1, inject, shallowRef, onBeforeUnmount, onBeforeMount,
|
1
|
+
import { defineComponent, watch, openBlock, createBlock, unref, createElementBlock, createElementVNode, nextTick, normalizeStyle as normalizeStyle$1, toDisplayString, ref, watchEffect, normalizeProps, guardReactiveProps, withCtx, Fragment, renderList, mergeProps, computed, onMounted, onUnmounted, provide, reactive, getCurrentInstance, createVNode as createVNode$1, normalizeClass, isRef, pushScopeId, popScopeId, useCssVars, withDirectives, vShow, createCommentVNode, renderSlot, resolveDynamicComponent, createTextVNode, h, markRaw, capitalize, getCurrentScope, onScopeDispose, warn as warn$1, inject, shallowRef, onBeforeUnmount, onBeforeMount, toRef, toRefs, onUpdated, useSlots, TransitionGroup, useAttrs as useAttrs$1, withModifiers, Transition, cloneVNode, Text, Comment, Teleport, readonly, onDeactivated, toRaw, triggerRef, resolveComponent, resolveDirective, withKeys, vModelText, createSlots } from "vue";
|
2
2
|
import { ElProgress, ElTable, ElTableColumn, ElButton, ElTag as ElTag$1, ElMessage, ElIcon as ElIcon$1, ElDivider, ElDialog, ElScrollbar as ElScrollbar$1, ElCollapse, ElCollapseItem, ElFormItem as ElFormItem$1, ElTooltip as ElTooltip$1, ElSelect as ElSelect$1, ElOption as ElOption$1, ElInputNumber, ElInput as ElInput$1, ElColorPicker, ElSwitch, ElDrawer, ElTabs, ElTabPane, ElTree, ElForm, ElContainer, ElHeader, ElAside, ElMain, ElUpload, ElMessageBox } from "element-plus";
|
3
3
|
import "animate.css";
|
4
4
|
import VChart, { THEME_KEY } from "vue-echarts";
|
@@ -1041,11 +1041,11 @@ const t$p = {
|
|
1041
1041
|
fill: "#5ad562",
|
1042
1042
|
"p-id": "1530",
|
1043
1043
|
"data-spm-anchor-id": "a313x.manage_type_myprojects.0.i1.1adc3a81uCnBP5"
|
1044
|
-
}, null, -1), _hoisted_6$
|
1044
|
+
}, null, -1), _hoisted_6$8 = [
|
1045
1045
|
_hoisted_3$f,
|
1046
1046
|
_hoisted_4$b,
|
1047
1047
|
_hoisted_5$9
|
1048
|
-
], _hoisted_7$
|
1048
|
+
], _hoisted_7$8 = ["id"], _hoisted_8$7 = /* @__PURE__ */ createElementVNode("path", {
|
1049
1049
|
d: "M747.52 238.933333 H276.48 C122.88 238.933333 0 361.813333 0 512 s122.88 273.066667 276.48 273.066667 H750.933333 c150.186667 0 276.48-122.88 276.48-273.066667 s-126.293333-273.066667-279.893333-273.066667z",
|
1050
1050
|
fill: "white",
|
1051
1051
|
"fill-opacity": ".01",
|
@@ -1097,11 +1097,11 @@ const t$p = {
|
|
1097
1097
|
createElementVNode("symbol", {
|
1098
1098
|
viewBox: "0 0 1027 1024",
|
1099
1099
|
id: `${i.id}switch-demo-open`
|
1100
|
-
}, _hoisted_6$
|
1100
|
+
}, _hoisted_6$8, 8, _hoisted_2$i),
|
1101
1101
|
createElementVNode("symbol", {
|
1102
1102
|
viewBox: "0 0 1027 1024",
|
1103
1103
|
id: `${i.id}switch-demo-close`
|
1104
|
-
}, _hoisted_12$5, 8, _hoisted_7$
|
1104
|
+
}, _hoisted_12$5, 8, _hoisted_7$8),
|
1105
1105
|
createElementVNode("use", {
|
1106
1106
|
"xlink:href": `#${i.id}switch-demo-${i.isOpen ? "open" : "close"}`,
|
1107
1107
|
width: "100",
|
@@ -19177,10 +19177,10 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
|
|
19177
19177
|
autoresize: ""
|
19178
19178
|
}, null, 8, ["option"]));
|
19179
19179
|
}
|
19180
|
-
}), pieCharts_vue_vue_type_style_index_0_scoped_fec2cbf2_lang = "", PieCharts = /* @__PURE__ */ _export_sfc$1(_sfc_main$H, [["__scopeId", "data-v-fec2cbf2"]]), _hoisted_1$k = ["id"], _hoisted_2$h = ["id"], _hoisted_3$e = ["fill"], _hoisted_4$a = ["fill"], _hoisted_5$8 = ["fill"], _hoisted_6$
|
19180
|
+
}), pieCharts_vue_vue_type_style_index_0_scoped_fec2cbf2_lang = "", PieCharts = /* @__PURE__ */ _export_sfc$1(_sfc_main$H, [["__scopeId", "data-v-fec2cbf2"]]), _hoisted_1$k = ["id"], _hoisted_2$h = ["id"], _hoisted_3$e = ["fill"], _hoisted_4$a = ["fill"], _hoisted_5$8 = ["fill"], _hoisted_6$7 = /* @__PURE__ */ createElementVNode("path", {
|
19181
19181
|
d: "M375.466667 709.214815l-25.6 137.481481c0 2.844444 1.896296 5.688889 7.585185 10.42963l65.422222 54.992593c5.688889 4.740741 15.17037 8.533333 23.703704 10.429629l36.029629-193.422222-107.14074-19.911111z",
|
19182
19182
|
fill: "#2D4375"
|
19183
|
-
}, null, -1), _hoisted_7$
|
19183
|
+
}, null, -1), _hoisted_7$7 = /* @__PURE__ */ createElementVNode("path", {
|
19184
19184
|
d: "M482.607407 729.125926l-36.029629 193.422222c9.481481 1.896296 18.014815 1.896296 25.6-0.948148l80.592592-27.496296c6.637037-1.896296 10.42963-4.740741 11.377778-6.637037L589.748148 749.037037l-107.140741-19.911111z",
|
19185
19185
|
fill: "#1E2D4F"
|
19186
19186
|
}, null, -1), _hoisted_8$6 = ["fill-opacity"], _hoisted_9$6 = ["fill-opacity"], _hoisted_10$5 = ["fill-opacity"], _hoisted_11$4 = /* @__PURE__ */ createElementVNode("path", {
|
@@ -19228,8 +19228,8 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
|
|
19228
19228
|
d: "M467.437037 806.874074c-7.585185-0.948148-12.325926-7.585185-14.222222-14.222222l-38.874074-256c-0.948148-5.688889 0.948148-11.377778 4.74074-15.170371 3.792593-3.792593 9.481481-5.688889 15.170371-4.74074l167.822222 31.288889c5.688889 0.948148 10.42963 4.740741 12.325926 9.481481 1.896296 4.740741 1.896296 11.377778-0.948148 16.118519L486.4 798.340741c-3.792593 6.637037-11.377778 10.42963-18.962963 8.533333z m-14.222222-251.259259l27.496296 182.992592L572.681481 578.37037l-119.466666-22.755555z",
|
19229
19229
|
fill: i.isOpen ? "#F12A3F" : "#666666"
|
19230
19230
|
}, null, 8, _hoisted_5$8),
|
19231
|
-
_hoisted_6$
|
19232
|
-
_hoisted_7$
|
19231
|
+
_hoisted_6$7,
|
19232
|
+
_hoisted_7$7,
|
19233
19233
|
createElementVNode("path", {
|
19234
19234
|
d: "M612.503704 217.125926c-3.792593 18.014815-20.859259 29.392593-38.874074 26.548148-18.014815-3.792593-30.340741-20.859259-26.548149-38.874074l18.962963-100.503704c3.792593-18.014815 20.859259-29.392593 38.874075-26.548148 18.014815 3.792593 30.340741 20.859259 26.548148 38.874074l-18.962963 100.503704z",
|
19235
19235
|
fill: "#FDB813",
|
@@ -19256,7 +19256,7 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
|
|
19256
19256
|
}, null, 8, _hoisted_14$3)
|
19257
19257
|
], 8, _hoisted_1$k));
|
19258
19258
|
}
|
19259
|
-
}), _hoisted_1$j = ["id"], _hoisted_2$g = ["id"], _hoisted_3$d = ["fill"], _hoisted_4$9 = ["fill"], _hoisted_5$7 = ["fill"], _hoisted_6$
|
19259
|
+
}), _hoisted_1$j = ["id"], _hoisted_2$g = ["id"], _hoisted_3$d = ["fill"], _hoisted_4$9 = ["fill"], _hoisted_5$7 = ["fill"], _hoisted_6$6 = ["from", "to"], _hoisted_7$6 = ["fill"], _hoisted_8$5 = ["from", "to"], _hoisted_9$5 = ["fill"], _hoisted_10$4 = ["fill"], _hoisted_11$3 = ["fill"], _hoisted_12$3 = ["from", "to"], _hoisted_13$2 = ["fill"], _hoisted_14$2 = ["xlink:href"], _sfc_main$F = /* @__PURE__ */ defineComponent({
|
19260
19260
|
__name: "clock-a",
|
19261
19261
|
props: {
|
19262
19262
|
id: { default: "" },
|
@@ -19298,7 +19298,7 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
|
|
19298
19298
|
to: `${405 + unref(a) * 6} 512.3 506.3`,
|
19299
19299
|
dur: "3600s",
|
19300
19300
|
repeatCount: "indefinite"
|
19301
|
-
}, null, 8, _hoisted_6$
|
19301
|
+
}, null, 8, _hoisted_6$6)
|
19302
19302
|
], 8, _hoisted_5$7),
|
19303
19303
|
createElementVNode("path", {
|
19304
19304
|
d: "M512.3 523.8c-4.5 0-9-1.7-12.4-5.1-6.8-6.8-6.8-17.9 0-24.8l130.8-130.8c6.8-6.8 17.9-6.8 24.8 0 6.8 6.8 6.8 17.9 0 24.8L524.7 518.7c-3.5 3.4-7.9 5.1-12.4 5.1z",
|
@@ -19313,7 +19313,7 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
|
|
19313
19313
|
dur: "43200s",
|
19314
19314
|
repeatCount: "indefinite"
|
19315
19315
|
}, null, 8, _hoisted_8$5)
|
19316
|
-
], 8, _hoisted_7$
|
19316
|
+
], 8, _hoisted_7$6),
|
19317
19317
|
createElementVNode("path", {
|
19318
19318
|
d: "M512.3 506.3m-47.5 0a47.5 47.5 0 1 0 95 0 47.5 47.5 0 1 0-95 0Z",
|
19319
19319
|
fill: n.circleColor
|
@@ -20348,7 +20348,7 @@ const _withScopeId$2 = (r) => (pushScopeId("data-v-62907637"), r = r(), popScope
|
|
20348
20348
|
], -1)), _hoisted_4$8 = {
|
20349
20349
|
class: "flex justify-between",
|
20350
20350
|
style: { width: "calc(100% - 440px)" }
|
20351
|
-
}, _hoisted_5$6 = { class: "flex items-center" }, _hoisted_6$
|
20351
|
+
}, _hoisted_5$6 = { class: "flex items-center" }, _hoisted_6$5 = { class: "flex items-center mr-20px" }, _hoisted_7$5 = {
|
20352
20352
|
class: "flex items-center",
|
20353
20353
|
style: { width: "250px" }
|
20354
20354
|
}, _hoisted_8$4 = /* @__PURE__ */ _withScopeId$2(() => /* @__PURE__ */ createElementVNode("div", {
|
@@ -20366,7 +20366,7 @@ const _withScopeId$2 = (r) => (pushScopeId("data-v-62907637"), r = r(), popScope
|
|
20366
20366
|
class: "el-divider el-divider--horizontal",
|
20367
20367
|
role: "separator",
|
20368
20368
|
style: { "--el-border-style": "solid" }
|
20369
|
-
}, null, -1)), _hoisted_17 = /* @__PURE__ */ _withScopeId$2(() => /* @__PURE__ */ createElementVNode("div", { class: "font-bold mb-10px text-15px guide-title" }, "标尺辅助线", -1)), _hoisted_18 = /* @__PURE__ */ _withScopeId$2(() => /* @__PURE__ */ createElementVNode("div", null, "在标尺区域按住鼠标左键并拖动即可创建标尺辅助线,将标尺辅助线拖动到标尺区域即可删除标尺辅助线", -1)), _hoisted_19 = /* @__PURE__ */ _withScopeId$2(() => /* @__PURE__ */ createElementVNode("div", {
|
20369
|
+
}, null, -1)), _hoisted_17$1 = /* @__PURE__ */ _withScopeId$2(() => /* @__PURE__ */ createElementVNode("div", { class: "font-bold mb-10px text-15px guide-title" }, "标尺辅助线", -1)), _hoisted_18$1 = /* @__PURE__ */ _withScopeId$2(() => /* @__PURE__ */ createElementVNode("div", null, "在标尺区域按住鼠标左键并拖动即可创建标尺辅助线,将标尺辅助线拖动到标尺区域即可删除标尺辅助线", -1)), _hoisted_19 = /* @__PURE__ */ _withScopeId$2(() => /* @__PURE__ */ createElementVNode("div", {
|
20370
20370
|
class: "el-divider el-divider--horizontal",
|
20371
20371
|
role: "separator",
|
20372
20372
|
style: { "--el-border-style": "solid" }
|
@@ -20534,7 +20534,7 @@ const _withScopeId$2 = (r) => (pushScopeId("data-v-62907637"), r = r(), popScope
|
|
20534
20534
|
_: 1
|
20535
20535
|
})
|
20536
20536
|
]),
|
20537
|
-
createElementVNode("div", _hoisted_6$
|
20537
|
+
createElementVNode("div", _hoisted_6$5, [
|
20538
20538
|
createVNode$1(unref(ElIcon$1), {
|
20539
20539
|
title: "返回",
|
20540
20540
|
class: "bt-Icon",
|
@@ -20572,7 +20572,7 @@ const _withScopeId$2 = (r) => (pushScopeId("data-v-62907637"), r = r(), popScope
|
|
20572
20572
|
})
|
20573
20573
|
])
|
20574
20574
|
]),
|
20575
|
-
createElementVNode("div", _hoisted_7$
|
20575
|
+
createElementVNode("div", _hoisted_7$5, [
|
20576
20576
|
createVNode$1(unref(ElIcon$1), {
|
20577
20577
|
size: 24,
|
20578
20578
|
class: "bt-Icon",
|
@@ -20611,8 +20611,8 @@ const _withScopeId$2 = (r) => (pushScopeId("data-v-62907637"), r = r(), popScope
|
|
20611
20611
|
_hoisted_14$1,
|
20612
20612
|
_hoisted_15$1,
|
20613
20613
|
_hoisted_16$2,
|
20614
|
-
_hoisted_17,
|
20615
|
-
_hoisted_18,
|
20614
|
+
_hoisted_17$1,
|
20615
|
+
_hoisted_18$1,
|
20616
20616
|
_hoisted_19,
|
20617
20617
|
_hoisted_20,
|
20618
20618
|
_hoisted_21,
|
@@ -20812,7 +20812,7 @@ const _withScopeId$2 = (r) => (pushScopeId("data-v-62907637"), r = r(), popScope
|
|
20812
20812
|
is_old_width: !1,
|
20813
20813
|
is_old_height: !0
|
20814
20814
|
};
|
20815
|
-
}, _hoisted_1$f = { style: { "vector-effect": "non-scaling-stroke" } }, _hoisted_2$c = ["fill", "x", "y"], _hoisted_3$b = ["cx", "cy"], _hoisted_4$7 = ["x1", "y1", "x2", "y2"], _hoisted_5$5 = ["fill", "x", "y"], _hoisted_6$
|
20815
|
+
}, _hoisted_1$f = { style: { "vector-effect": "non-scaling-stroke" } }, _hoisted_2$c = ["fill", "x", "y"], _hoisted_3$b = ["cx", "cy"], _hoisted_4$7 = ["x1", "y1", "x2", "y2"], _hoisted_5$5 = ["fill", "x", "y"], _hoisted_6$4 = ["fill", "x", "y"], _hoisted_7$4 = ["fill", "x", "y"], _hoisted_8$3 = ["fill", "x", "y"], _hoisted_9$3 = ["fill", "x", "y"], _hoisted_10$2 = ["fill", "x", "y"], _hoisted_11$1 = ["fill", "x", "y"], _sfc_main$A = /* @__PURE__ */ defineComponent({
|
20816
20816
|
__name: "handle-panel",
|
20817
20817
|
props: {
|
20818
20818
|
itemInfo: {}
|
@@ -20984,7 +20984,7 @@ const _withScopeId$2 = (r) => (pushScopeId("data-v-62907637"), r = r(), popScope
|
|
20984
20984
|
y: n.itemInfo.actual_bound.y - unref(u) - unref(getCoordinateOffset)(n.itemInfo.actual_bound.height, n.itemInfo.scale_y),
|
20985
20985
|
stroke: "rgba(0,0,0,0)",
|
20986
20986
|
onMousedown: _[2] || (_[2] = (b) => p(unref(EScaleInfoType).TopRight, b))
|
20987
|
-
}, null, 44, _hoisted_6$
|
20987
|
+
}, null, 44, _hoisted_6$4), [
|
20988
20988
|
[vShow, unref(d)]
|
20989
20989
|
]),
|
20990
20990
|
withDirectives(createElementVNode("rect", {
|
@@ -20998,7 +20998,7 @@ const _withScopeId$2 = (r) => (pushScopeId("data-v-62907637"), r = r(), popScope
|
|
20998
20998
|
y: n.itemInfo.actual_bound.y - unref(u) + n.itemInfo.actual_bound.height * n.itemInfo.scale_y / 2 - unref(getCoordinateOffset)(n.itemInfo.actual_bound.height, n.itemInfo.scale_y),
|
20999
20999
|
stroke: "rgba(0,0,0,0)",
|
21000
21000
|
onMousedown: _[3] || (_[3] = (b) => p(unref(EScaleInfoType).Left, b))
|
21001
|
-
}, null, 44, _hoisted_7$
|
21001
|
+
}, null, 44, _hoisted_7$4), [
|
21002
21002
|
[vShow, unref(d)]
|
21003
21003
|
]),
|
21004
21004
|
withDirectives(createElementVNode("rect", {
|
@@ -21059,7 +21059,7 @@ const _withScopeId$2 = (r) => (pushScopeId("data-v-62907637"), r = r(), popScope
|
|
21059
21059
|
])
|
21060
21060
|
]));
|
21061
21061
|
}
|
21062
|
-
}), handlePanel_vue_vue_type_style_index_0_scoped_e6622df8_lang = "", HandlePanel = /* @__PURE__ */ _export_sfc$1(_sfc_main$A, [["__scopeId", "data-v-e6622df8"]]), _hoisted_1$e = ["fill"], _hoisted_2$b = ["cx", "cy", "r"], _hoisted_3$a = ["cx", "cy", "r"], _hoisted_4$6 = ["cx", "cy", "r"], _hoisted_5$4 = ["cx", "cy", "r"], _hoisted_6$
|
21062
|
+
}), handlePanel_vue_vue_type_style_index_0_scoped_e6622df8_lang = "", HandlePanel = /* @__PURE__ */ _export_sfc$1(_sfc_main$A, [["__scopeId", "data-v-e6622df8"]]), _hoisted_1$e = ["fill"], _hoisted_2$b = ["cx", "cy", "r"], _hoisted_3$a = ["cx", "cy", "r"], _hoisted_4$6 = ["cx", "cy", "r"], _hoisted_5$4 = ["cx", "cy", "r"], _hoisted_6$3 = ["cx", "cy", "r"], _hoisted_7$3 = ["cx", "cy", "r"], _hoisted_8$2 = ["cx", "cy", "r"], _hoisted_9$2 = ["cx", "cy", "r"], _sfc_main$z = /* @__PURE__ */ defineComponent({
|
21063
21063
|
__name: "connection-panel",
|
21064
21064
|
props: {
|
21065
21065
|
itemInfo: {}
|
@@ -21162,14 +21162,14 @@ const _withScopeId$2 = (r) => (pushScopeId("data-v-62907637"), r = r(), popScope
|
|
21162
21162
|
cy: unref(_),
|
21163
21163
|
r: unref(u),
|
21164
21164
|
"fill-opacity": ".3"
|
21165
|
-
}, null, 8, _hoisted_6$
|
21165
|
+
}, null, 8, _hoisted_6$3),
|
21166
21166
|
createElementVNode("circle", {
|
21167
21167
|
id: "connection_bc",
|
21168
21168
|
cx: unref(g),
|
21169
21169
|
cy: unref(_),
|
21170
21170
|
r: unref(a),
|
21171
21171
|
"pointer-events": "all"
|
21172
|
-
}, null, 8, _hoisted_7$
|
21172
|
+
}, null, 8, _hoisted_7$3)
|
21173
21173
|
], 32),
|
21174
21174
|
createElementVNode("g", {
|
21175
21175
|
onMousedown: T[6] || (T[6] = (L) => S(L, unref(ELineBindAnchors).Left)),
|
@@ -21193,7 +21193,7 @@ const _withScopeId$2 = (r) => (pushScopeId("data-v-62907637"), r = r(), popScope
|
|
21193
21193
|
], 32)
|
21194
21194
|
], 8, _hoisted_1$e));
|
21195
21195
|
}
|
21196
|
-
}), connectionPanel_vue_vue_type_style_index_0_scoped_fb729c7a_lang = "", ConnectionPanel = /* @__PURE__ */ _export_sfc$1(_sfc_main$z, [["__scopeId", "data-v-fb729c7a"]]), _hoisted_1$d = ["d", "stroke-width"], _hoisted_2$a = ["d", "stroke-width"], _hoisted_3$9 = ["id", "d", "stroke", "stroke-width", "stroke-dasharray"], _hoisted_4$5 = ["from", "to", "dur", "repeatCount"], _hoisted_5$3 = ["d", "stroke", "stroke-width", "stroke-dasharray"], _hoisted_6$
|
21196
|
+
}), connectionPanel_vue_vue_type_style_index_0_scoped_fb729c7a_lang = "", ConnectionPanel = /* @__PURE__ */ _export_sfc$1(_sfc_main$z, [["__scopeId", "data-v-fb729c7a"]]), _hoisted_1$d = ["d", "stroke-width"], _hoisted_2$a = ["d", "stroke-width"], _hoisted_3$9 = ["id", "d", "stroke", "stroke-width", "stroke-dasharray"], _hoisted_4$5 = ["from", "to", "dur", "repeatCount"], _hoisted_5$3 = ["d", "stroke", "stroke-width", "stroke-dasharray"], _hoisted_6$2 = ["from", "to", "dur", "repeatCount"], _hoisted_7$2 = ["r", "fill"], _hoisted_8$1 = ["path", "dur", "repeatCount"], _hoisted_9$1 = ["cx", "cy", "r", "stroke-width"], _hoisted_10$1 = ["cx", "cy", "r", "stroke", "onMousedown"], _sfc_main$y = /* @__PURE__ */ defineComponent({
|
21197
21197
|
__name: "connection-line",
|
21198
21198
|
props: {
|
21199
21199
|
itemInfo: {},
|
@@ -21285,7 +21285,7 @@ const _withScopeId$2 = (r) => (pushScopeId("data-v-62907637"), r = r(), popScope
|
|
21285
21285
|
dur: `${n.itemInfo.animations.dur.val}s`,
|
21286
21286
|
repeatCount: n.itemInfo.animations.repeatCount.val,
|
21287
21287
|
fill: "freeze"
|
21288
|
-
}, null, 8, _hoisted_6$
|
21288
|
+
}, null, 8, _hoisted_6$2)
|
21289
21289
|
], 8, _hoisted_5$3)) : ((_ = n.itemInfo.animations) == null ? void 0 : _.type.val) === unref(EConfigAnimationsType).Track ? (openBlock(), createElementBlock("circle", {
|
21290
21290
|
key: 1,
|
21291
21291
|
cx: "0",
|
@@ -21300,7 +21300,7 @@ const _withScopeId$2 = (r) => (pushScopeId("data-v-62907637"), r = r(), popScope
|
|
21300
21300
|
dur: `${n.itemInfo.animations.dur.val}s`,
|
21301
21301
|
repeatCount: n.itemInfo.animations.repeatCount.val
|
21302
21302
|
}, null, 8, _hoisted_8$1)
|
21303
|
-
], 8, _hoisted_7$
|
21303
|
+
], 8, _hoisted_7$2)) : createCommentVNode("", !0),
|
21304
21304
|
createElementVNode("g", null, [
|
21305
21305
|
(openBlock(!0), createElementBlock(Fragment, null, renderList(n.itemInfo.props.point_position.val, (b, A) => {
|
21306
21306
|
var w;
|
@@ -21332,19 +21332,23 @@ const _withScopeId$2 = (r) => (pushScopeId("data-v-62907637"), r = r(), popScope
|
|
21332
21332
|
], 4);
|
21333
21333
|
};
|
21334
21334
|
}
|
21335
|
-
}), _hoisted_1$c = {
|
21335
|
+
}), _hoisted_1$c = { style: { position: "absolute", left: "0", top: "0", bottom: "0", right: "0" } }, _hoisted_2$9 = {
|
21336
|
+
xmlns: "http://www.w3.org/2000/svg",
|
21337
|
+
width: "100%",
|
21338
|
+
height: "100%"
|
21339
|
+
}, _hoisted_3$8 = {
|
21336
21340
|
id: "pattern_grid",
|
21337
21341
|
patternUnits: "userSpaceOnUse",
|
21338
21342
|
x: "0",
|
21339
21343
|
y: "0",
|
21340
21344
|
width: "20",
|
21341
21345
|
height: "20"
|
21342
|
-
},
|
21346
|
+
}, _hoisted_4$4 = ["stroke"], _hoisted_5$2 = ["stroke"], _hoisted_6$1 = ["stroke"], _hoisted_7$1 = ["stroke"], _hoisted_8 = {
|
21343
21347
|
key: 0,
|
21344
21348
|
width: "100%",
|
21345
21349
|
height: "100%",
|
21346
21350
|
fill: "url(#pattern_grid)"
|
21347
|
-
},
|
21351
|
+
}, _hoisted_9 = ["transform"], _hoisted_10 = ["transform"], _hoisted_11 = ["transform", "onMousedown", "onMouseup", "onMouseenter", "onMouseleave", "onContextmenu"], _hoisted_12$1 = ["xlink:href", "width", "height", "id", "transform"], _hoisted_13 = ["id"], _hoisted_14 = ["id", "x1", "y1", "x2", "y2"], _hoisted_15 = ["id"], _hoisted_16$1 = ["x", "y", "height", "width"], _hoisted_17 = ["onClick"], _hoisted_18 = { class: "shortcut" }, _sfc_main$x = /* @__PURE__ */ defineComponent({
|
21348
21352
|
__name: "center-panel",
|
21349
21353
|
props: {
|
21350
21354
|
vueComp: {}
|
@@ -21352,7 +21356,7 @@ const _withScopeId$2 = (r) => (pushScopeId("data-v-62907637"), r = r(), popScope
|
|
21352
21356
|
setup(r, { expose: n }) {
|
21353
21357
|
const i = r;
|
21354
21358
|
useCssVars((Ie) => ({
|
21355
|
-
"
|
21359
|
+
"20fb3c82": unref(v)
|
21356
21360
|
}));
|
21357
21361
|
const o = useGlobalStore(pinia), a = useConfigStore(pinia), u = useSvgEditLayoutStore(pinia), c = useEditPrivateStore(pinia), f = useContextMenuStore(pinia);
|
21358
21362
|
componentsRegister(i.vueComp);
|
@@ -21827,10 +21831,11 @@ const _withScopeId$2 = (r) => (pushScopeId("data-v-62907637"), r = r(), popScope
|
|
21827
21831
|
});
|
21828
21832
|
}), n({ onCanvasMouseUp: re }), (Ie, Pt) => (openBlock(), createElementBlock(Fragment, null, [
|
21829
21833
|
createElementVNode("div", {
|
21830
|
-
class: "canvas",
|
21831
|
-
tabindex: "0",
|
21832
21834
|
ref_key: "canvasRef",
|
21833
21835
|
ref: p,
|
21836
|
+
class: "canvas",
|
21837
|
+
style: normalizeStyle$1({ backgroundColor: unref(a).svg.background_color, position: "relative" }),
|
21838
|
+
tabindex: "0",
|
21834
21839
|
onDrop: x,
|
21835
21840
|
onDragenter: T,
|
21836
21841
|
onDragover: L,
|
@@ -21841,150 +21846,148 @@ const _withScopeId$2 = (r) => (pushScopeId("data-v-62907637"), r = r(), popScope
|
|
21841
21846
|
onKeydown: Ce,
|
21842
21847
|
onMousewheel: Y
|
21843
21848
|
}, [
|
21844
|
-
(
|
21845
|
-
|
21846
|
-
|
21847
|
-
|
21848
|
-
|
21849
|
-
|
21850
|
-
|
21851
|
-
|
21852
|
-
|
21853
|
-
|
21854
|
-
|
21855
|
-
|
21856
|
-
|
21857
|
-
|
21858
|
-
|
21859
|
-
|
21860
|
-
|
21861
|
-
|
21862
|
-
|
21863
|
-
|
21864
|
-
|
21865
|
-
|
21866
|
-
|
21867
|
-
|
21868
|
-
|
21869
|
-
|
21870
|
-
|
21871
|
-
|
21872
|
-
|
21873
|
-
|
21874
|
-
|
21875
|
-
|
21876
|
-
|
21877
|
-
|
21878
|
-
|
21879
|
-
|
21880
|
-
|
21881
|
-
|
21882
|
-
|
21883
|
-
|
21884
|
-
|
21885
|
-
|
21886
|
-
|
21887
|
-
|
21888
|
-
|
21889
|
-
|
21890
|
-
transform: `translate(${xe.x},${xe.y})rotate(0)scale(1)`,
|
21891
|
-
onMousewheel: Pt[0] || (Pt[0] = //@ts-ignore
|
21892
|
-
(...hn) => unref(stopEvent) && unref(stopEvent)(...hn))
|
21893
|
-
}, [
|
21894
|
-
createElementVNode("g", {
|
21895
|
-
class: normalizeClass(`${unref(getCommonClass)(xe)}`)
|
21849
|
+
renderSlot(Ie.$slots, "background", {}, void 0, !0),
|
21850
|
+
createElementVNode("div", _hoisted_1$c, [
|
21851
|
+
(openBlock(), createElementBlock("svg", _hoisted_2$9, [
|
21852
|
+
createElementVNode("defs", null, [
|
21853
|
+
createElementVNode("pattern", _hoisted_3$8, [
|
21854
|
+
createElementVNode("line", {
|
21855
|
+
x1: "0",
|
21856
|
+
y1: "0",
|
21857
|
+
x2: "0",
|
21858
|
+
y2: "20",
|
21859
|
+
stroke: unref(a).svg.grid_color
|
21860
|
+
}, null, 8, _hoisted_4$4),
|
21861
|
+
createElementVNode("line", {
|
21862
|
+
x1: "10",
|
21863
|
+
y1: "0",
|
21864
|
+
x2: "10",
|
21865
|
+
y2: "20",
|
21866
|
+
stroke: unref(a).svg.grid_color
|
21867
|
+
}, null, 8, _hoisted_5$2),
|
21868
|
+
createElementVNode("line", {
|
21869
|
+
x1: "0",
|
21870
|
+
y1: "0",
|
21871
|
+
x2: "20",
|
21872
|
+
y2: "0",
|
21873
|
+
stroke: unref(a).svg.grid_color
|
21874
|
+
}, null, 8, _hoisted_6$1),
|
21875
|
+
createElementVNode("line", {
|
21876
|
+
x1: "0",
|
21877
|
+
y1: "10",
|
21878
|
+
x2: "20",
|
21879
|
+
y2: "10",
|
21880
|
+
stroke: unref(a).svg.grid_color
|
21881
|
+
}, null, 8, _hoisted_7$1)
|
21882
|
+
])
|
21883
|
+
]),
|
21884
|
+
unref(a).svg.grid ? (openBlock(), createElementBlock("rect", _hoisted_8)) : createCommentVNode("", !0),
|
21885
|
+
createElementVNode("g", {
|
21886
|
+
transform: `translate(${unref(u).center_offset.x * unref(a).svg.scale},${unref(u).center_offset.y * unref(a).svg.scale})rotate(0)scale(${unref(a).svg.scale})`
|
21887
|
+
}, [
|
21888
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(o).done_json, (xe, Lt) => {
|
21889
|
+
var _n, In, jt, he, At, kt, Cn, ze, _e, de, Et, Oe, Ve, Dt;
|
21890
|
+
return withDirectives((openBlock(), createElementBlock("g", {
|
21891
|
+
key: xe.id,
|
21892
|
+
transform: `translate(${xe.x},${xe.y})rotate(0)scale(1)`,
|
21893
|
+
onMousewheel: Pt[0] || (Pt[0] = //@ts-ignore
|
21894
|
+
(...hn) => unref(stopEvent) && unref(stopEvent)(...hn))
|
21896
21895
|
}, [
|
21897
21896
|
createElementVNode("g", {
|
21898
|
-
|
21899
|
-
onMousedown: (hn) => k(xe, Lt, hn),
|
21900
|
-
onMouseup: (hn) => M(xe, Lt, hn),
|
21901
|
-
onMouseenter: (hn) => O(xe, Lt, hn),
|
21902
|
-
onMouseleave: (hn) => ie(xe, Lt, hn),
|
21903
|
-
onContextmenu: (hn) => pe(xe, Lt, hn)
|
21897
|
+
class: normalizeClass(`${unref(getCommonClass)(xe)}`)
|
21904
21898
|
}, [
|
21905
|
-
|
21906
|
-
|
21907
|
-
|
21908
|
-
|
21909
|
-
|
21910
|
-
|
21911
|
-
|
21912
|
-
},
|
21913
|
-
|
21914
|
-
|
21915
|
-
|
21916
|
-
|
21917
|
-
|
21918
|
-
|
21919
|
-
|
21920
|
-
|
21921
|
-
|
21922
|
-
|
21923
|
-
}), null, 16, ["width", "height", "id", "transform"])) : xe.type === unref(EDoneJsonType).Vue ? (openBlock(), createElementBlock("foreignObject", mergeProps({ key: 3 }, ue(xe.actual_bound, xe.scale_x, xe.scale_y), {
|
21924
|
-
id: `foreign-object${xe.id}`,
|
21925
|
-
class: "foreignObject"
|
21926
|
-
}), [
|
21927
|
-
(openBlock(), createBlock(resolveDynamicComponent(xe.tag), mergeProps(unref(prosToVBind)(xe), {
|
21899
|
+
createElementVNode("g", {
|
21900
|
+
transform: `translate(${xe.actual_bound.x + xe.actual_bound.width / 2},${xe.actual_bound.y + xe.actual_bound.height / 2})rotate(${xe.rotate}) scale(1) translate(${-(xe.actual_bound.x + xe.actual_bound.width / 2)},${-(xe.actual_bound.y + xe.actual_bound.height / 2)})`,
|
21901
|
+
onMousedown: (hn) => k(xe, Lt, hn),
|
21902
|
+
onMouseup: (hn) => M(xe, Lt, hn),
|
21903
|
+
onMouseenter: (hn) => O(xe, Lt, hn),
|
21904
|
+
onMouseleave: (hn) => ie(xe, Lt, hn),
|
21905
|
+
onContextmenu: (hn) => pe(xe, Lt, hn)
|
21906
|
+
}, [
|
21907
|
+
xe.type === unref(EDoneJsonType).ConnectionLine ? (openBlock(), createBlock(_sfc_main$y, {
|
21908
|
+
key: 0,
|
21909
|
+
"item-info": xe,
|
21910
|
+
"point-visible": unref(g).connection_line && ((_n = unref(g).select_item.info) == null ? void 0 : _n.id) == xe.id
|
21911
|
+
}, null, 8, ["item-info", "point-visible"])) : xe.type === unref(EDoneJsonType).File ? (openBlock(), createElementBlock("use", mergeProps({
|
21912
|
+
key: 1,
|
21913
|
+
"xlink:href": `#svg-${xe.name}`
|
21914
|
+
}, unref(prosToVBind)(xe, ["height", "width"]), {
|
21915
|
+
width: ((jt = (In = xe.props) == null ? void 0 : In.width) == null ? void 0 : jt.val) ?? 100,
|
21916
|
+
height: ((At = (he = xe.props) == null ? void 0 : he.height) == null ? void 0 : At.val) ?? 100,
|
21928
21917
|
id: xe.id,
|
21929
21918
|
transform: `translate(${xe.actual_bound.x + xe.actual_bound.width / 2},${xe.actual_bound.y + xe.actual_bound.height / 2}) scale(${xe.scale_x},${xe.scale_y}) translate(${-(xe.actual_bound.x + xe.actual_bound.width / 2)},${-(xe.actual_bound.y + xe.actual_bound.height / 2)})`
|
21930
|
-
}), {
|
21931
|
-
|
21932
|
-
|
21933
|
-
|
21934
|
-
|
21935
|
-
|
21936
|
-
|
21937
|
-
|
21938
|
-
|
21939
|
-
|
21940
|
-
|
21941
|
-
|
21942
|
-
|
21943
|
-
|
21944
|
-
|
21945
|
-
|
21946
|
-
|
21947
|
-
|
21948
|
-
|
21949
|
-
|
21950
|
-
|
21951
|
-
|
21952
|
-
|
21953
|
-
|
21954
|
-
|
21955
|
-
|
21956
|
-
"
|
21957
|
-
"
|
21958
|
-
"
|
21959
|
-
}
|
21960
|
-
|
21961
|
-
|
21962
|
-
|
21963
|
-
|
21964
|
-
|
21965
|
-
|
21966
|
-
|
21967
|
-
|
21968
|
-
|
21969
|
-
|
21970
|
-
|
21971
|
-
|
21972
|
-
|
21973
|
-
|
21974
|
-
|
21975
|
-
|
21976
|
-
|
21977
|
-
|
21978
|
-
|
21979
|
-
|
21980
|
-
|
21981
|
-
|
21982
|
-
|
21983
|
-
|
21984
|
-
|
21985
|
-
|
21986
|
-
|
21987
|
-
|
21919
|
+
}), null, 16, _hoisted_12$1)) : xe.type === unref(EDoneJsonType).CustomSvg ? (openBlock(), createBlock(resolveDynamicComponent(xe.tag), mergeProps({ key: 2 }, unref(prosToVBind)(xe, ["height", "width"]), {
|
21920
|
+
width: ((Cn = (kt = xe.props) == null ? void 0 : kt.width) == null ? void 0 : Cn.val) ?? 100,
|
21921
|
+
height: ((_e = (ze = xe.props) == null ? void 0 : ze.height) == null ? void 0 : _e.val) ?? 100,
|
21922
|
+
id: xe.id,
|
21923
|
+
onResize: Fe,
|
21924
|
+
transform: `translate(${xe.actual_bound.x + xe.actual_bound.width / 2},${xe.actual_bound.y + xe.actual_bound.height / 2}) scale(${xe.scale_x},${xe.scale_y}) translate(${-(xe.actual_bound.x + xe.actual_bound.width / 2)},${-(xe.actual_bound.y + xe.actual_bound.height / 2)})`
|
21925
|
+
}), null, 16, ["width", "height", "id", "transform"])) : xe.type === unref(EDoneJsonType).Vue ? (openBlock(), createElementBlock("foreignObject", mergeProps({ key: 3 }, ue(xe.actual_bound, xe.scale_x, xe.scale_y), {
|
21926
|
+
id: `foreign-object${xe.id}`,
|
21927
|
+
class: "foreignObject"
|
21928
|
+
}), [
|
21929
|
+
(openBlock(), createBlock(resolveDynamicComponent(xe.tag), mergeProps(unref(prosToVBind)(xe), {
|
21930
|
+
id: xe.id,
|
21931
|
+
transform: `translate(${xe.actual_bound.x + xe.actual_bound.width / 2},${xe.actual_bound.y + xe.actual_bound.height / 2}) scale(${xe.scale_x},${xe.scale_y}) translate(${-(xe.actual_bound.x + xe.actual_bound.width / 2)},${-(xe.actual_bound.y + xe.actual_bound.height / 2)})`
|
21932
|
+
}), {
|
21933
|
+
default: withCtx(() => [
|
21934
|
+
createTextVNode(toDisplayString(xe.tag_slot), 1)
|
21935
|
+
]),
|
21936
|
+
_: 2
|
21937
|
+
}, 1040, ["id", "transform"]))
|
21938
|
+
], 16, _hoisted_13)) : xe.type === unref(EDoneJsonType).StraightLine ? (openBlock(), createElementBlock("line", {
|
21939
|
+
key: 4,
|
21940
|
+
id: xe.id,
|
21941
|
+
x1: xe.props.start_x.val,
|
21942
|
+
y1: xe.props.start_y.val,
|
21943
|
+
x2: xe.props.end_x.val,
|
21944
|
+
y2: xe.props.end_y.val,
|
21945
|
+
fill: "#FF0000",
|
21946
|
+
stroke: "#FF0000",
|
21947
|
+
"stroke-width": "2"
|
21948
|
+
}, null, 8, _hoisted_14)) : createCommentVNode("", !0),
|
21949
|
+
xe.config.actual_rect ? (openBlock(), createElementBlock("rect", mergeProps({
|
21950
|
+
key: 5,
|
21951
|
+
id: `rect${xe.id}`,
|
21952
|
+
fill: "black",
|
21953
|
+
"fill-opacity": "0"
|
21954
|
+
}, ue(xe.actual_bound, xe.scale_x, xe.scale_y), {
|
21955
|
+
style: { stroke: "none", "stroke-width": "2", "stroke-miterlimit": "10" },
|
21956
|
+
class: {
|
21957
|
+
"svg-item-none": !xe.selected && (unref(o).intention == unref(EGlobalStoreIntention).None || unref(o).intention == unref(EGlobalStoreIntention).Select),
|
21958
|
+
"svg-item-move": unref(o).intention == unref(EGlobalStoreIntention).Move && ((de = unref(o).handle_svg_info) == null ? void 0 : de.info.id) == xe.id,
|
21959
|
+
"svg-item-select": unref(o).intention == unref(EGlobalStoreIntention).Select && ((Et = unref(o).handle_svg_info) == null ? void 0 : Et.info.id) == xe.id,
|
21960
|
+
"svg-item-in-group": xe.selected
|
21961
|
+
}
|
21962
|
+
}), null, 16, _hoisted_15)) : createCommentVNode("", !0),
|
21963
|
+
((Oe = unref(o).handle_svg_info) == null ? void 0 : Oe.info.id) === xe.id && unref(g).handle_panel && xe.type !== unref(EDoneJsonType).ConnectionLine ? (openBlock(), createBlock(HandlePanel, {
|
21964
|
+
key: 6,
|
21965
|
+
"item-info": xe
|
21966
|
+
}, null, 8, ["item-info"])) : createCommentVNode("", !0),
|
21967
|
+
!xe.selected && ((Ve = unref(g).select_item.info) == null ? void 0 : Ve.id) == xe.id && unref(g).connection_panel && xe.config.have_anchor && unref(o).intention !== unref(EGlobalStoreIntention).SelectArea && (unref(o).intention !== unref(EGlobalStoreIntention).Select || xe.id !== ((Dt = unref(o).handle_svg_info) == null ? void 0 : Dt.info.id)) ? (openBlock(), createBlock(ConnectionPanel, {
|
21968
|
+
key: 7,
|
21969
|
+
onContextmenu: z,
|
21970
|
+
"item-info": xe
|
21971
|
+
}, null, 8, ["item-info"])) : createCommentVNode("", !0)
|
21972
|
+
], 40, _hoisted_11)
|
21973
|
+
], 2)
|
21974
|
+
], 40, _hoisted_10)), [
|
21975
|
+
[vShow, xe.display]
|
21976
|
+
]);
|
21977
|
+
}), 128)),
|
21978
|
+
createElementVNode("rect", {
|
21979
|
+
x: unref(b).x,
|
21980
|
+
y: unref(b).y,
|
21981
|
+
height: unref(b).height,
|
21982
|
+
width: unref(b).with,
|
21983
|
+
stroke: "#107cec",
|
21984
|
+
fill: "#107cec",
|
21985
|
+
"fill-opacity": ".2"
|
21986
|
+
}, null, 8, _hoisted_16$1)
|
21987
|
+
], 8, _hoisted_9)
|
21988
|
+
]))
|
21989
|
+
])
|
21990
|
+
], 36),
|
21988
21991
|
withDirectives(createElementVNode("ul", {
|
21989
21992
|
ref_key: "contextMenuRef",
|
21990
21993
|
ref: d,
|
@@ -21998,15 +22001,15 @@ const _withScopeId$2 = (r) => (pushScopeId("data-v-62907637"), r = r(), popScope
|
|
21998
22001
|
class: normalizeClass(xe.enable ? "" : "disabled")
|
21999
22002
|
}, [
|
22000
22003
|
createTextVNode(toDisplayString(xe.title) + " ", 1),
|
22001
|
-
createElementVNode("span",
|
22004
|
+
createElementVNode("span", _hoisted_18, toDisplayString(xe.hot_key), 1)
|
22002
22005
|
], 2)
|
22003
|
-
], 8,
|
22006
|
+
], 8, _hoisted_17))), 128))
|
22004
22007
|
], 512), [
|
22005
22008
|
[vShow, unref(f).display]
|
22006
22009
|
])
|
22007
22010
|
], 64));
|
22008
22011
|
}
|
22009
|
-
}),
|
22012
|
+
}), centerPanel_vue_vue_type_style_index_0_scoped_c77c0287_lang = "", CenterPanel = /* @__PURE__ */ _export_sfc$1(_sfc_main$x, [["__scopeId", "data-v-c77c0287"]]);
|
22010
22013
|
/*! Element Plus Icons Vue v2.1.0 */
|
22011
22014
|
var export_helper_default = (r, n) => {
|
22012
22015
|
let i = r.__vccOpts || r;
|
@@ -30359,13 +30362,18 @@ const _hoisted_1$1 = { class: "canvas-main-pc" }, _sfc_main$1 = /* @__PURE__ */
|
|
30359
30362
|
ref_key: "centerRef",
|
30360
30363
|
ref: d,
|
30361
30364
|
vueComp: o.vueComp
|
30362
|
-
},
|
30365
|
+
}, {
|
30366
|
+
background: withCtx(() => [
|
30367
|
+
renderSlot(T.$slots, "background", {}, void 0, !0)
|
30368
|
+
]),
|
30369
|
+
_: 3
|
30370
|
+
}, 8, ["vueComp"])
|
30363
30371
|
]),
|
30364
|
-
_:
|
30372
|
+
_: 3
|
30365
30373
|
}, 8, ["visible"])
|
30366
30374
|
])
|
30367
30375
|
]),
|
30368
|
-
_:
|
30376
|
+
_: 3
|
30369
30377
|
}),
|
30370
30378
|
createVNode$1(unref(ElAside), {
|
30371
30379
|
class: normalizeClass(["side-nav", unref(u).right_nav ? "show-nav" : "hide-nav"]),
|
@@ -30382,10 +30390,10 @@ const _hoisted_1$1 = { class: "canvas-main-pc" }, _sfc_main$1 = /* @__PURE__ */
|
|
30382
30390
|
_: 1
|
30383
30391
|
}, 8, ["class"])
|
30384
30392
|
]),
|
30385
|
-
_:
|
30393
|
+
_: 3
|
30386
30394
|
})
|
30387
30395
|
]),
|
30388
|
-
_:
|
30396
|
+
_: 3
|
30389
30397
|
}),
|
30390
30398
|
createVNode$1(unref(ElDialog), {
|
30391
30399
|
class: "modal-full",
|
@@ -30448,7 +30456,7 @@ const _hoisted_1$1 = { class: "canvas-main-pc" }, _sfc_main$1 = /* @__PURE__ */
|
|
30448
30456
|
}, 8, ["modelValue"])
|
30449
30457
|
]));
|
30450
30458
|
}
|
30451
|
-
}),
|
30459
|
+
}), index_vue_vue_type_style_index_0_scoped_ed6b1a90_lang = "", index = /* @__PURE__ */ _export_sfc$1(_sfc_main$1, [["__scopeId", "data-v-ed6b1a90"]]);
|
30452
30460
|
function commonjsRequire(r) {
|
30453
30461
|
throw new Error('Could not dynamically require "' + r + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
|
30454
30462
|
}
|
@@ -42713,7 +42721,11 @@ const sub = (r, n, i, o, a) => {
|
|
42713
42721
|
client && client.end && client.end(!0, {}, () => {
|
42714
42722
|
console.log("MQTT服务连接关闭");
|
42715
42723
|
});
|
42716
|
-
}, _hoisted_1 =
|
42724
|
+
}, _hoisted_1 = { style: { position: "absolute", left: "0", top: "0", bottom: "0", right: "0" } }, _hoisted_2 = {
|
42725
|
+
xmlns: "http://www.w3.org/2000/svg",
|
42726
|
+
width: "100%",
|
42727
|
+
height: "100%"
|
42728
|
+
}, _hoisted_3 = ["transform"], _hoisted_4 = ["transform", "onClick"], _hoisted_5 = ["transform"], _hoisted_6 = ["xlink:href", "width", "height", "id", "transform"], _hoisted_7 = ["id"], _sfc_main = /* @__PURE__ */ defineComponent({
|
42717
42729
|
__name: "svg-viewer",
|
42718
42730
|
props: {
|
42719
42731
|
vueComp: {},
|
@@ -42724,7 +42736,7 @@ const sub = (r, n, i, o, a) => {
|
|
42724
42736
|
setup(r, { expose: n, emit: i }) {
|
42725
42737
|
const o = r;
|
42726
42738
|
useCssVars((S) => ({
|
42727
|
-
"
|
42739
|
+
"01996f39": unref(c)
|
42728
42740
|
})), setEditorLoadTime();
|
42729
42741
|
const a = useGlobalStore(pinia);
|
42730
42742
|
componentsRegister(o.vueComp);
|
@@ -42864,6 +42876,7 @@ const sub = (r, n, i, o, a) => {
|
|
42864
42876
|
setNodeAttrByID: w
|
42865
42877
|
}), (S, x) => (openBlock(), createElementBlock("div", {
|
42866
42878
|
class: "canvas",
|
42879
|
+
style: normalizeStyle$1({ backgroundColor: unref(u).config.svg.background_color, position: "relative" }),
|
42867
42880
|
onMousedown: p,
|
42868
42881
|
onMousemove: f,
|
42869
42882
|
onMouseup: d,
|
@@ -42871,80 +42884,78 @@ const sub = (r, n, i, o, a) => {
|
|
42871
42884
|
onContextmenu: x[4] || (x[4] = //@ts-ignore
|
42872
42885
|
(...T) => unref(preventDefault) && unref(preventDefault)(...T))
|
42873
42886
|
}, [
|
42874
|
-
(
|
42875
|
-
|
42876
|
-
|
42877
|
-
|
42878
|
-
|
42879
|
-
|
42880
|
-
|
42881
|
-
|
42882
|
-
|
42883
|
-
|
42884
|
-
|
42885
|
-
|
42886
|
-
|
42887
|
-
|
42888
|
-
|
42889
|
-
|
42890
|
-
|
42891
|
-
|
42892
|
-
|
42893
|
-
|
42894
|
-
|
42895
|
-
(...Y) => unref(stopEvent) && unref(stopEvent)(...Y)),
|
42896
|
-
onMousewheel: x[3] || (x[3] = //@ts-ignore
|
42897
|
-
(...Y) => unref(stopEvent) && unref(stopEvent)(...Y))
|
42898
|
-
}, [
|
42899
|
-
createElementVNode("g", {
|
42900
|
-
class: normalizeClass(`${unref(getCommonClass)(T)}`)
|
42887
|
+
renderSlot(S.$slots, "background", {}, void 0, !0),
|
42888
|
+
createElementVNode("div", _hoisted_1, [
|
42889
|
+
(openBlock(), createElementBlock("svg", _hoisted_2, [
|
42890
|
+
createElementVNode("g", {
|
42891
|
+
transform: `translate(${unref(u).layout_center.x},${unref(u).layout_center.y})rotate(0)scale(${unref(u).config.svg.scale})`
|
42892
|
+
}, [
|
42893
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(u).done_json, (T) => {
|
42894
|
+
var L, k, M, O, ie, F, re, D;
|
42895
|
+
return withDirectives((openBlock(), createElementBlock("g", {
|
42896
|
+
key: T.id,
|
42897
|
+
transform: `translate(${T.x},${T.y})rotate(0)scale(1)`,
|
42898
|
+
style: normalizeStyle$1(g(T)),
|
42899
|
+
onClick: (Y) => _(T, unref(EEventType).Click),
|
42900
|
+
onMousedown: x[0] || (x[0] = //@ts-ignore
|
42901
|
+
(...Y) => unref(stopEvent) && unref(stopEvent)(...Y)),
|
42902
|
+
onMousemove: x[1] || (x[1] = //@ts-ignore
|
42903
|
+
(...Y) => unref(stopEvent) && unref(stopEvent)(...Y)),
|
42904
|
+
onMouseup: x[2] || (x[2] = //@ts-ignore
|
42905
|
+
(...Y) => unref(stopEvent) && unref(stopEvent)(...Y)),
|
42906
|
+
onMousewheel: x[3] || (x[3] = //@ts-ignore
|
42907
|
+
(...Y) => unref(stopEvent) && unref(stopEvent)(...Y))
|
42901
42908
|
}, [
|
42902
42909
|
createElementVNode("g", {
|
42903
|
-
|
42910
|
+
class: normalizeClass(`${unref(getCommonClass)(T)}`)
|
42904
42911
|
}, [
|
42905
|
-
|
42906
|
-
|
42907
|
-
|
42908
|
-
|
42909
|
-
|
42910
|
-
|
42911
|
-
|
42912
|
-
|
42913
|
-
|
42914
|
-
|
42915
|
-
|
42916
|
-
|
42917
|
-
|
42918
|
-
|
42919
|
-
|
42920
|
-
|
42921
|
-
|
42922
|
-
}), null, 16, ["width", "height", "id", "onOnChange", "transform"])) : T.type === unref(EDoneJsonType).Vue ? (openBlock(), createElementBlock("foreignObject", mergeProps({ key: 3 }, v(T.actual_bound, T.scale_x, T.scale_y), {
|
42923
|
-
id: `foreign-object${T.id}`,
|
42924
|
-
class: "foreignObject"
|
42925
|
-
}), [
|
42926
|
-
(openBlock(), createBlock(resolveDynamicComponent(T.tag), mergeProps(unref(prosToVBind)(T), {
|
42912
|
+
createElementVNode("g", {
|
42913
|
+
transform: `translate(${T.actual_bound.x + T.actual_bound.width / 2},${T.actual_bound.y + T.actual_bound.height / 2})rotate(${T.rotate}) scale(1) translate(${-(T.actual_bound.x + T.actual_bound.width / 2)},${-(T.actual_bound.y + T.actual_bound.height / 2)})`
|
42914
|
+
}, [
|
42915
|
+
T.type === unref(EDoneJsonType).ConnectionLine ? (openBlock(), createBlock(_sfc_main$y, {
|
42916
|
+
key: 0,
|
42917
|
+
"item-info": T
|
42918
|
+
}, null, 8, ["item-info"])) : T.type === unref(EDoneJsonType).File ? (openBlock(), createElementBlock("use", mergeProps({
|
42919
|
+
key: 1,
|
42920
|
+
"xlink:href": `#svg-${T.name}`
|
42921
|
+
}, unref(prosToVBind)(T, ["height", "width"]), {
|
42922
|
+
width: ((k = (L = T.props) == null ? void 0 : L.width) == null ? void 0 : k.val) ?? 100,
|
42923
|
+
height: ((O = (M = T.props) == null ? void 0 : M.height) == null ? void 0 : O.val) ?? 100,
|
42924
|
+
id: T.id,
|
42925
|
+
transform: `translate(${T.actual_bound.x + T.actual_bound.width / 2},${T.actual_bound.y + T.actual_bound.height / 2}) scale(${T.scale_x},${T.scale_y}) translate(${-(T.actual_bound.x + T.actual_bound.width / 2)},${-(T.actual_bound.y + T.actual_bound.height / 2)})`
|
42926
|
+
}), null, 16, _hoisted_6)) : T.type === unref(EDoneJsonType).CustomSvg ? (openBlock(), createBlock(resolveDynamicComponent(T.tag), mergeProps({ key: 2 }, unref(prosToVBind)(T, ["height", "width"]), {
|
42927
|
+
width: ((F = (ie = T.props) == null ? void 0 : ie.width) == null ? void 0 : F.val) ?? 100,
|
42928
|
+
height: ((D = (re = T.props) == null ? void 0 : re.height) == null ? void 0 : D.val) ?? 100,
|
42927
42929
|
id: T.id,
|
42928
42930
|
onOnChange: (Y) => _(T, unref(EEventType).Change),
|
42929
42931
|
transform: `translate(${T.actual_bound.x + T.actual_bound.width / 2},${T.actual_bound.y + T.actual_bound.height / 2}) scale(${T.scale_x},${T.scale_y}) translate(${-(T.actual_bound.x + T.actual_bound.width / 2)},${-(T.actual_bound.y + T.actual_bound.height / 2)})`
|
42930
|
-
}), {
|
42931
|
-
|
42932
|
-
|
42933
|
-
|
42934
|
-
|
42935
|
-
|
42936
|
-
|
42937
|
-
|
42938
|
-
|
42939
|
-
|
42940
|
-
|
42941
|
-
|
42942
|
-
|
42943
|
-
|
42944
|
-
|
42945
|
-
|
42932
|
+
}), null, 16, ["width", "height", "id", "onOnChange", "transform"])) : T.type === unref(EDoneJsonType).Vue ? (openBlock(), createElementBlock("foreignObject", mergeProps({ key: 3 }, v(T.actual_bound, T.scale_x, T.scale_y), {
|
42933
|
+
id: `foreign-object${T.id}`,
|
42934
|
+
class: "foreignObject"
|
42935
|
+
}), [
|
42936
|
+
(openBlock(), createBlock(resolveDynamicComponent(T.tag), mergeProps(unref(prosToVBind)(T), {
|
42937
|
+
id: T.id,
|
42938
|
+
onOnChange: (Y) => _(T, unref(EEventType).Change),
|
42939
|
+
transform: `translate(${T.actual_bound.x + T.actual_bound.width / 2},${T.actual_bound.y + T.actual_bound.height / 2}) scale(${T.scale_x},${T.scale_y}) translate(${-(T.actual_bound.x + T.actual_bound.width / 2)},${-(T.actual_bound.y + T.actual_bound.height / 2)})`
|
42940
|
+
}), {
|
42941
|
+
default: withCtx(() => [
|
42942
|
+
createTextVNode(toDisplayString(T.tag_slot), 1)
|
42943
|
+
]),
|
42944
|
+
_: 2
|
42945
|
+
}, 1040, ["id", "onOnChange", "transform"]))
|
42946
|
+
], 16, _hoisted_7)) : createCommentVNode("", !0)
|
42947
|
+
], 8, _hoisted_5)
|
42948
|
+
], 2)
|
42949
|
+
], 44, _hoisted_4)), [
|
42950
|
+
[vShow, T.display]
|
42951
|
+
]);
|
42952
|
+
}), 128))
|
42953
|
+
], 8, _hoisted_3)
|
42954
|
+
]))
|
42955
|
+
])
|
42956
|
+
], 36));
|
42946
42957
|
}
|
42947
|
-
}),
|
42958
|
+
}), svgViewer_vue_vue_type_style_index_0_scoped_7f6cd20a_lang = "", svgViewer = /* @__PURE__ */ _export_sfc$1(_sfc_main, [["__scopeId", "data-v-7f6cd20a"]]);
|
42948
42959
|
export {
|
42949
42960
|
index as SvgEditor,
|
42950
42961
|
svgViewer as SvgViewer
|