@zhangqingcq/vgce 0.1.28 → 0.1.30
Sign up to get free protection for your applications and to get access to all the features.
package/package.json
CHANGED
@@ -11,15 +11,15 @@
|
|
11
11
|
getCenterPoint,
|
12
12
|
getCommonClass,
|
13
13
|
getSvgNowPosition,
|
14
|
+
getZoomPosition,
|
14
15
|
moveAnchors,
|
15
16
|
moveHandlePoint,
|
17
|
+
myFixed,
|
16
18
|
objectDeepClone,
|
17
19
|
prosToVBind,
|
18
20
|
randomString,
|
19
21
|
resetHandlePointOld,
|
20
|
-
setSvgActualInfo
|
21
|
-
getZoomPosition,
|
22
|
-
myFixed
|
22
|
+
setSvgActualInfo
|
23
23
|
} from '@/utils'
|
24
24
|
import {
|
25
25
|
calculateBottom,
|
@@ -33,8 +33,7 @@
|
|
33
33
|
} from '@/utils/scale-core'
|
34
34
|
import HandlePanel from '@/components/svg-editor/handle-panel.vue'
|
35
35
|
import ConnectionPanel from '@/components/svg-editor/connection-panel.vue'
|
36
|
-
import type
|
37
|
-
import { EDoneJsonType } from '@/config/types'
|
36
|
+
import { EDoneJsonType, type IConfigItem } from '@/config/types'
|
38
37
|
import ConnectionLine from '@/components/svg-editor/connection-line.vue'
|
39
38
|
import type { IVisibleInfo } from '../config'
|
40
39
|
import { useContextMenuStore, useEditPrivateStore } from '@/stores/system'
|
@@ -207,11 +206,15 @@
|
|
207
206
|
canvasRef.value?.focus()
|
208
207
|
if (globalStore.intention === EGlobalStoreIntention.Connection) {
|
209
208
|
e.stopPropagation()
|
209
|
+
if (!globalStore.handle_svg_info) {
|
210
|
+
//空白地方画线
|
211
|
+
createLine(e)
|
212
|
+
}
|
210
213
|
if (globalStore.handle_svg_info) {
|
211
214
|
if (e.button === 0) {
|
212
215
|
//鼠标左键创建新线段
|
213
216
|
const l = globalStore.handle_svg_info.info.props.point_position.val
|
214
|
-
if (l.length
|
217
|
+
if (l.length !== 1 && select_item?.type !== EDoneJsonType.ConnectionLine) {
|
215
218
|
//鼠标移动后的实时位置(相对于起始点,只在创建第一个点时记录了鼠标原始位置)
|
216
219
|
l.push({
|
217
220
|
x:
|
@@ -223,6 +226,12 @@
|
|
223
226
|
globalStore.mouse_info.position_y -
|
224
227
|
svgEditLayoutStore.center_offset.y
|
225
228
|
})
|
229
|
+
} else {
|
230
|
+
//第二个点,在鼠标没有移动的情况下,就是起始点
|
231
|
+
globalStore.handle_svg_info.info.props.point_position.val.push({
|
232
|
+
x: 0,
|
233
|
+
y: 0
|
234
|
+
})
|
226
235
|
}
|
227
236
|
} else if (e.button === 2) {
|
228
237
|
//鼠标右键结束线段绘制
|
@@ -142,6 +142,14 @@
|
|
142
142
|
|
143
143
|
onMounted(() => {
|
144
144
|
configStore.net.mqtt.useGlobalMqtt = Boolean(props.mqtt?.cover)
|
145
|
+
if (!configStore.net.mqtt.global) {
|
146
|
+
configStore.net.mqtt.global = {
|
147
|
+
url: '',
|
148
|
+
user: '',
|
149
|
+
pwd: '',
|
150
|
+
topics: ''
|
151
|
+
}
|
152
|
+
}
|
145
153
|
configStore.net.mqtt.global.url = props.mqtt?.url || ''
|
146
154
|
configStore.net.mqtt.global.user = props.mqtt?.user || ''
|
147
155
|
configStore.net.mqtt.global.pwd = props.mqtt?.pwd || ''
|
@@ -36,6 +36,11 @@
|
|
36
36
|
set(v: any) {
|
37
37
|
globalStore.intention = v ? EGlobalStoreIntention.Connection : EGlobalStoreIntention.None
|
38
38
|
if (v) {
|
39
|
+
globalStore.done_json.forEach((e: Record<string, any>) => {
|
40
|
+
if (e?.selected) {
|
41
|
+
e.selected = false
|
42
|
+
}
|
43
|
+
})
|
39
44
|
globalStore.setHandleSvgInfo(null)
|
40
45
|
}
|
41
46
|
}
|
@@ -157,16 +162,16 @@
|
|
157
162
|
<el-scrollbar max-height="60vh">
|
158
163
|
<div class="font-bold mb-10px text-15px guide-title" style="padding-top: 16px">多选</div>
|
159
164
|
<div
|
160
|
-
>在画布空白区域按住鼠标左键可以框选(图形中心点在框选区域即判定被选中),也可以按住ctrl
|
161
|
-
>
|
165
|
+
>在画布空白区域按住鼠标左键可以框选(图形中心点在框选区域即判定被选中),也可以按住ctrl+鼠标左键点图形进行多选
|
166
|
+
</div>
|
162
167
|
<div class="el-divider el-divider--horizontal" role="separator" style="--el-border-style: solid"></div>
|
163
168
|
<div class="font-bold mb-10px text-15px guide-title">拖动画布</div>
|
164
169
|
<div>在画布空白区域按住右键可拖动画布,右侧面板‘图纸’栏可微调或重置位置</div>
|
165
170
|
<div class="el-divider el-divider--horizontal" role="separator" style="--el-border-style: solid"></div>
|
166
171
|
<div class="font-bold mb-10px text-15px guide-title">画布缩放</div>
|
167
172
|
<div
|
168
|
-
|
169
|
-
>
|
173
|
+
>在画布中使用鼠标滚轮或者右侧面板‘图纸’栏可控制画布缩放,鼠标滚轮以鼠标位置为缩放中心,图纸栏以图纸原点(默认在左上角)为缩放中心
|
174
|
+
</div>
|
170
175
|
<div class="el-divider el-divider--horizontal" role="separator" style="--el-border-style: solid"></div>
|
171
176
|
<div class="font-bold mb-10px text-15px guide-title">标尺辅助线</div>
|
172
177
|
<div>在标尺区域按住鼠标左键并拖动即可创建标尺辅助线,将标尺辅助线拖动到标尺区域即可删除标尺辅助线</div>
|