@zhangqingcq/vgce 0.1.19 → 0.1.21
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/style.css +1 -1
- package/dist/vgce.js +26 -18
- package/dist/vgce.umd.cjs +2 -2
- package/package.json +1 -1
- package/src/components/svg-editor/center-panel.vue +32 -1
- package/src/components/svg-editor/top-panel.vue +1 -1
- package/src/config/svg/animation/thermometer.ts +1 -1
- package/src/config/svg/custom/clock-a.ts +1 -1
- package/src/config/svg/custom/light.ts +1 -1
- package/src/config/svg/custom/svg-text.ts +1 -1
- package/src/config/svg/custom/switch-r.ts +1 -1
- package/src/config/svg/stateful/alert-light.ts +1 -1
- package/src/config/vue/component/button.ts +1 -1
- package/src/config/vue/component/common-table.ts +1 -1
- package/src/config/vue/component/progress.ts +1 -1
- package/src/config/vue/component/tag.ts +1 -1
- package/src/config/vue/echarts/pie-charts.ts +1 -1
package/package.json
CHANGED
|
@@ -207,6 +207,30 @@
|
|
|
207
207
|
canvasRef.value?.focus()
|
|
208
208
|
if (globalStore.intention === EGlobalStoreIntention.Connection) {
|
|
209
209
|
e.stopPropagation()
|
|
210
|
+
if (globalStore.handle_svg_info) {
|
|
211
|
+
if (e.button === 0) {
|
|
212
|
+
//鼠标左键创建新线段
|
|
213
|
+
const l = globalStore.handle_svg_info.info.props.point_position.val
|
|
214
|
+
if (l.length > 1 && l[0].x !== l[1].x && l[0].y !== l[1].y) {
|
|
215
|
+
//鼠标移动后的实时位置(相对于起始点,只在创建第一个点时记录了鼠标原始位置)
|
|
216
|
+
l.push({
|
|
217
|
+
x:
|
|
218
|
+
globalStore.mouse_info.new_position_x -
|
|
219
|
+
globalStore.mouse_info.position_x -
|
|
220
|
+
svgEditLayoutStore.center_offset.x,
|
|
221
|
+
y:
|
|
222
|
+
globalStore.mouse_info.new_position_y -
|
|
223
|
+
globalStore.mouse_info.position_y -
|
|
224
|
+
svgEditLayoutStore.center_offset.y
|
|
225
|
+
})
|
|
226
|
+
}
|
|
227
|
+
} else if (e.button === 2) {
|
|
228
|
+
//鼠标右键结束线段绘制
|
|
229
|
+
globalStore.intention = EGlobalStoreIntention.None
|
|
230
|
+
setSvgActualInfo(globalStore.done_json[globalStore.handle_svg_info.index])
|
|
231
|
+
globalStore.setHandleSvgInfo(null)
|
|
232
|
+
}
|
|
233
|
+
}
|
|
210
234
|
return
|
|
211
235
|
}
|
|
212
236
|
e.preventDefault()
|
|
@@ -287,6 +311,7 @@
|
|
|
287
311
|
}
|
|
288
312
|
}
|
|
289
313
|
}
|
|
314
|
+
|
|
290
315
|
const onSvgMouseEnter = (select_item: IDoneJson, index: number, e: MouseEvent) => {
|
|
291
316
|
e.preventDefault()
|
|
292
317
|
e.stopPropagation()
|
|
@@ -613,6 +638,7 @@
|
|
|
613
638
|
}
|
|
614
639
|
}
|
|
615
640
|
}
|
|
641
|
+
|
|
616
642
|
const onCanvasMouseUp = () => {
|
|
617
643
|
//如果鼠标不是按下状态
|
|
618
644
|
if (globalStore.mouse_info.state != EMouseInfoState.Down) {
|
|
@@ -666,7 +692,11 @@
|
|
|
666
692
|
globalStore.setHandleSvgInfo(null)
|
|
667
693
|
for (let e of globalStore.done_json) {
|
|
668
694
|
const t = selectRect.value
|
|
669
|
-
e.selected =
|
|
695
|
+
e.selected =
|
|
696
|
+
e.center_position.x > t.x &&
|
|
697
|
+
e.center_position.x < t.x + t.with &&
|
|
698
|
+
e.center_position.y > t.y &&
|
|
699
|
+
e.center_position.y < t.y + t.height
|
|
670
700
|
}
|
|
671
701
|
globalStore.intention = EGlobalStoreIntention.None
|
|
672
702
|
} else if (globalStore.intention != EGlobalStoreIntention.Select) {
|
|
@@ -683,6 +713,7 @@
|
|
|
683
713
|
}
|
|
684
714
|
contextMenuStore.display = false
|
|
685
715
|
}
|
|
716
|
+
|
|
686
717
|
const onCanvasMouseDown = (e: MouseEvent) => {
|
|
687
718
|
const { clientX, clientY } = e
|
|
688
719
|
if (globalStore.intention === EGlobalStoreIntention.Connection) {
|
|
@@ -157,7 +157,7 @@
|
|
|
157
157
|
<el-scrollbar max-height="60vh">
|
|
158
158
|
<div class="font-bold mb-10px text-15px guide-title" style="padding-top: 16px">多选</div>
|
|
159
159
|
<div
|
|
160
|
-
|
|
160
|
+
>在画布空白区域按住鼠标左键可以框选(图形中心点在框选区域即判定被选中),也可以按住ctrl+鼠标左键点图形进行多选</div
|
|
161
161
|
>
|
|
162
162
|
<div class="el-divider el-divider--horizontal" role="separator" style="--el-border-style: solid"></div>
|
|
163
163
|
<div class="font-bold mb-10px text-15px guide-title">拖动画布</div>
|