From 2e5a1e2e7247bb20dfc20415ada1b2f937028938 Mon Sep 17 00:00:00 2001 From: chiyi Date: Mon, 12 Oct 2026 13:22:52 +0800 Subject: [PATCH] =?UTF-8?q?fix(canvas):=20=E6=94=BE=E5=AE=BD=E5=BE=85?= =?UTF-8?q?=E8=BF=9E=E7=BA=BF=E5=8F=96=E6=B6=88=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/canvas/CanvasStage.vue | 7 ++++--- frontend/src/views/CanvasView.vue | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/frontend/src/components/canvas/CanvasStage.vue b/frontend/src/components/canvas/CanvasStage.vue index 056386f..25d00b7 100644 --- a/frontend/src/components/canvas/CanvasStage.vue +++ b/frontend/src/components/canvas/CanvasStage.vue @@ -216,6 +216,7 @@ function onPointerDown(e) { // 2) 点击连线:切换选中(不再落入平移) const edgeHit = e.target.closest?.('.cv-edge-hit') if (edgeHit && e.button === 0) { + linkSource.value = null const id = edgeHit.dataset.edgeId const s = new Set(edgeSel.value) if (s.has(id)) s.delete(id) @@ -226,7 +227,7 @@ function onPointerDown(e) { } const node = hitNode(e) - if (!node) linkSource.value = null + if (!node || node.id === linkSource.value?.id) linkSource.value = null const p = localXY(e) const wantPan = @@ -355,7 +356,7 @@ function onPortClick(id, side) { return } if (linkSource.value.id === id) { - linkSource.value = linkSource.value.side === side ? null : { id, side } + linkSource.value = null return } emit('link-create', { @@ -570,7 +571,7 @@ defineExpose({
-
拖拽空白平移 · Ctrl+滚轮缩放 · 依次点击两个节点的连接点连线(Esc 取消) · 双击笔记编辑
+
拖拽空白平移 · Ctrl+滚轮缩放 · 依次点击两个连接点连线(再点起点/空白/Esc 取消) · 双击笔记编辑
diff --git a/frontend/src/views/CanvasView.vue b/frontend/src/views/CanvasView.vue index 7bddf62..ff8728f 100644 --- a/frontend/src/views/CanvasView.vue +++ b/frontend/src/views/CanvasView.vue @@ -857,8 +857,8 @@ const saveLabel = computed(() => ({
{{ genMsg }}
- 双击空白建笔记 · 依次点击两个连接点连线 · 选中后右下角缩放 · Ctrl+D 复制 · - 本地图片直接拖入或 Ctrl+V 粘贴 · 按 1 适应全部内容 + 双击空白建笔记 · 依次点击两个连接点连线,再点起点/空白/Esc 取消 · + 选中后右下角缩放 · Ctrl+D 复制 · 本地图片直接拖入或 Ctrl+V 粘贴 · 按 1 适应全部内容