From 21bcfda4dec7bd6d59e2487c6dbb3961819d1a65 Mon Sep 17 00:00:00 2001 From: baiqi Date: Tue, 13 Aug 2024 17:11:49 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E8=84=91=E5=9B=BE):=20=E8=8A=82=E7=82=B9?= =?UTF-8?q?=E8=8F=9C=E5=8D=95=E6=98=BE=E7=A4=BA=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pure/ms-minder-editor/menu/nodeFloatMenu.vue | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/pure/ms-minder-editor/menu/nodeFloatMenu.vue b/frontend/src/components/pure/ms-minder-editor/menu/nodeFloatMenu.vue index 2466811f2a..bc1323aa3d 100644 --- a/frontend/src/components/pure/ms-minder-editor/menu/nodeFloatMenu.vue +++ b/frontend/src/components/pure/ms-minder-editor/menu/nodeFloatMenu.vue @@ -252,8 +252,12 @@ nodePosition = window.minder.getSelectedNode()?.getRenderBox(); } const state = window.editor.fsm.state(); - if (nodePosition && isNodeInMinderView(undefined, nodePosition, nodePosition.width / 2) && state !== 'input') { - // 判断节点在脑图可视区域内且遮挡的节点不超过节点宽度的一半且当前不是编辑名称状态,则显示菜单 + if ( + nodePosition && + isNodeInMinderView(undefined, nodePosition, Math.min(nodePosition.width / 2, 200)) && + state !== 'input' + ) { + // 判断节点在脑图可视区域内且遮挡的节点不超过节点宽度的一半(超过 200px 则按 200px 算)且当前不是编辑名称状态,则显示菜单 const nodeDomHeight = nodePosition.height || 0; menuPopupOffset.value = [nodePosition.x, nodePosition.y + nodeDomHeight + 4]; // 菜单显示在节点下方4px处 menuVisible.value = true;