@zhangqingcq/vgce 0.1.19 → 0.1.20
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/style.css +1 -1
- package/dist/vgce.js +2750 -2744
- package/dist/vgce.umd.cjs +19 -19
- package/package.json +1 -1
- package/src/components/svg-editor/center-panel.vue +35 -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
@@ -287,6 +287,7 @@
|
|
287
287
|
}
|
288
288
|
}
|
289
289
|
}
|
290
|
+
|
290
291
|
const onSvgMouseEnter = (select_item: IDoneJson, index: number, e: MouseEvent) => {
|
291
292
|
e.preventDefault()
|
292
293
|
e.stopPropagation()
|
@@ -613,6 +614,7 @@
|
|
613
614
|
}
|
614
615
|
}
|
615
616
|
}
|
617
|
+
|
616
618
|
const onCanvasMouseUp = () => {
|
617
619
|
//如果鼠标不是按下状态
|
618
620
|
if (globalStore.mouse_info.state != EMouseInfoState.Down) {
|
@@ -666,7 +668,11 @@
|
|
666
668
|
globalStore.setHandleSvgInfo(null)
|
667
669
|
for (let e of globalStore.done_json) {
|
668
670
|
const t = selectRect.value
|
669
|
-
e.selected =
|
671
|
+
e.selected =
|
672
|
+
e.center_position.x > t.x &&
|
673
|
+
e.center_position.x < t.x + t.with &&
|
674
|
+
e.center_position.y > t.y &&
|
675
|
+
e.center_position.y < t.y + t.height
|
670
676
|
}
|
671
677
|
globalStore.intention = EGlobalStoreIntention.None
|
672
678
|
} else if (globalStore.intention != EGlobalStoreIntention.Select) {
|
@@ -683,6 +689,7 @@
|
|
683
689
|
}
|
684
690
|
contextMenuStore.display = false
|
685
691
|
}
|
692
|
+
|
686
693
|
const onCanvasMouseDown = (e: MouseEvent) => {
|
687
694
|
const { clientX, clientY } = e
|
688
695
|
if (globalStore.intention === EGlobalStoreIntention.Connection) {
|
@@ -765,6 +772,32 @@
|
|
765
772
|
}
|
766
773
|
}
|
767
774
|
|
775
|
+
const onLineMouseDown = (e: Record<string, any>) => {
|
776
|
+
if (globalStore.intention === EGlobalStoreIntention.Connection && globalStore.handle_svg_info) {
|
777
|
+
if (e.button === 0) {
|
778
|
+
//鼠标左键创建新线段
|
779
|
+
if (globalStore.handle_svg_info.info.props.point_position.val.length !== 2) {
|
780
|
+
//鼠标移动后的实时位置(相对于起始点,只在创建第一个点时记录了鼠标原始位置)
|
781
|
+
globalStore.handle_svg_info.info.props.point_position.val.push({
|
782
|
+
x:
|
783
|
+
globalStore.mouse_info.new_position_x -
|
784
|
+
globalStore.mouse_info.position_x -
|
785
|
+
svgEditLayoutStore.center_offset.x,
|
786
|
+
y:
|
787
|
+
globalStore.mouse_info.new_position_y -
|
788
|
+
globalStore.mouse_info.position_y -
|
789
|
+
svgEditLayoutStore.center_offset.y
|
790
|
+
})
|
791
|
+
}
|
792
|
+
} else if (e.button === 2) {
|
793
|
+
//鼠标右键结束线段绘制
|
794
|
+
globalStore.intention = EGlobalStoreIntention.None
|
795
|
+
setSvgActualInfo(globalStore.done_json[globalStore.handle_svg_info.index])
|
796
|
+
globalStore.setHandleSvgInfo(null)
|
797
|
+
}
|
798
|
+
}
|
799
|
+
}
|
800
|
+
|
768
801
|
function onMousewheel(e: any) {
|
769
802
|
if (e?.wheelDelta) {
|
770
803
|
if (e.wheelDelta > 0) {
|
@@ -1003,6 +1036,7 @@
|
|
1003
1036
|
v-if="item.type === EDoneJsonType.ConnectionLine"
|
1004
1037
|
:item-info="item"
|
1005
1038
|
:point-visible="visible_info.connection_line && visible_info.select_item.info?.id == item.id"
|
1039
|
+
@mousedown="onLineMouseDown"
|
1006
1040
|
/>
|
1007
1041
|
<use
|
1008
1042
|
v-else-if="item.type === EDoneJsonType.File"
|
@@ -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>
|