From 62365568e958e8c1fb9080e8904c2bca9883286a Mon Sep 17 00:00:00 2001 From: chiyi Date: Mon, 12 Oct 2026 15:13:53 +0800 Subject: [PATCH] =?UTF-8?q?fix(canvas):=20=E9=80=82=E5=BA=94=E5=86=85?= =?UTF-8?q?=E5=AE=B9=E6=97=B6=E9=81=BF=E5=BC=80=E5=BA=95=E9=83=A8=E8=BE=93?= =?UTF-8?q?=E5=85=A5=E6=A1=86=E5=8C=BA=E5=9F=9F=E5=B1=85=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/canvas/CanvasStage.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/canvas/CanvasStage.vue b/frontend/src/components/canvas/CanvasStage.vue index 258306c..805ad81 100644 --- a/frontend/src/components/canvas/CanvasStage.vue +++ b/frontend/src/components/canvas/CanvasStage.vue @@ -672,7 +672,10 @@ function onDblClick(e) { function fitToContent() { const r = stageEl.value?.getBoundingClientRect() const sw = r ? r.width : 800 - const sh = r ? r.height : 600 + // 底部悬浮输入框会遮住舞台下缘:把它的高度从可用区域里扣掉,内容避开输入框居中 + const dockEl = document.querySelector('.cv-dock') + const dockH = dockEl ? dockEl.getBoundingClientRect().height + 32 : 0 + const sh = Math.max(120, (r ? r.height : 600) - dockH) const nodes = props.nodes if (!nodes.length) { setViewport({ x: 0, y: 0, scale: 1 })