|
@@ -141,6 +141,16 @@ const done_json = computed({
|
|
|
globalStore.setGlobalStoreDoneJson(val)
|
|
globalStore.setGlobalStoreDoneJson(val)
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
|
|
+const commitActiveRightAsideEditor = () => {
|
|
|
|
|
+ const activeElement = document.activeElement
|
|
|
|
|
+ if (!(activeElement instanceof HTMLElement)) {
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+ if (!activeElement.closest('#mt-right-aside')) {
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+ activeElement.blur()
|
|
|
|
|
+}
|
|
|
const sys_line_init = configStore.sysComponent.find((f) => f.type == 'sys-line')!
|
|
const sys_line_init = configStore.sysComponent.find((f) => f.type == 'sys-line')!
|
|
|
const draw_line_init_data: IDoneJson = {
|
|
const draw_line_init_data: IDoneJson = {
|
|
|
id: sys_line_init.id + '-' + randomString(),
|
|
id: sys_line_init.id + '-' + randomString(),
|
|
@@ -277,6 +287,7 @@ const onDragOver = (e: DragEvent) => {
|
|
|
e.preventDefault()
|
|
e.preventDefault()
|
|
|
}
|
|
}
|
|
|
const onRenderCoreMouseDown = (item: IDoneJson, e: MouseEvent) => {
|
|
const onRenderCoreMouseDown = (item: IDoneJson, e: MouseEvent) => {
|
|
|
|
|
+ commitActiveRightAsideEditor()
|
|
|
beginListenerKeyDown()
|
|
beginListenerKeyDown()
|
|
|
if (isSystemShortcutKey(e)) {
|
|
if (isSystemShortcutKey(e)) {
|
|
|
shortcut_drag_select_item_id.value = item.lock ? '' : item.id
|
|
shortcut_drag_select_item_id.value = item.lock ? '' : item.id
|
|
@@ -324,6 +335,7 @@ const onRenderCoreMouseDown = (item: IDoneJson, e: MouseEvent) => {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
const onMouseDown = (e: MouseEvent) => {
|
|
const onMouseDown = (e: MouseEvent) => {
|
|
|
|
|
+ commitActiveRightAsideEditor()
|
|
|
beginListenerKeyDown()
|
|
beginListenerKeyDown()
|
|
|
if (isSystemShortcutKey(e)) {
|
|
if (isSystemShortcutKey(e)) {
|
|
|
shortcut_drag_select_item_id.value = ''
|
|
shortcut_drag_select_item_id.value = ''
|
|
@@ -776,7 +788,9 @@ const dragCanvasMouseUp = () => {
|
|
|
globalStore.setIntention('endDragCanvas')
|
|
globalStore.setIntention('endDragCanvas')
|
|
|
} else {
|
|
} else {
|
|
|
if (shortcut_drag_select_item_id.value) {
|
|
if (shortcut_drag_select_item_id.value) {
|
|
|
- const find_item = globalStore.done_json.find((f) => f.id == shortcut_drag_select_item_id.value)
|
|
|
|
|
|
|
+ const find_item = globalStore.done_json.find(
|
|
|
|
|
+ (f) => f.id == shortcut_drag_select_item_id.value
|
|
|
|
|
+ )
|
|
|
if (find_item) {
|
|
if (find_item) {
|
|
|
find_item.active = !find_item.active
|
|
find_item.active = !find_item.active
|
|
|
globalStore.refreshSelectedItemsId()
|
|
globalStore.refreshSelectedItemsId()
|