From b0e9741e816437a906ca37f660967c694878a545 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=BE=B7=E5=AE=87?= Date: Sat, 12 Sep 2026 14:49:30 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9C=A8=E9=A2=84=E8=A7=88=E5=8C=BA=E5=B0=BA?= =?UTF-8?q?=E5=AF=B8=E5=8F=98=E5=8C=96=E6=97=B6=E9=87=8D=E6=96=B0=E9=80=82?= =?UTF-8?q?=E9=85=8D=E7=94=BB=E5=B8=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 将画布尺寸纳入适配视口 effect 依赖,恢复面板调整后的自动 fit。 --- .../ui-editor/components/preview/PreviewWorkspace.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/apps/ai-game-creator-shell/src/view/ui-editor/components/preview/PreviewWorkspace.tsx b/apps/ai-game-creator-shell/src/view/ui-editor/components/preview/PreviewWorkspace.tsx index ba749ed99..8fbc37dbb 100644 --- a/apps/ai-game-creator-shell/src/view/ui-editor/components/preview/PreviewWorkspace.tsx +++ b/apps/ai-game-creator-shell/src/view/ui-editor/components/preview/PreviewWorkspace.tsx @@ -158,7 +158,13 @@ export function PreviewWorkspace({ }, }), ); - }, [activeImageId, logicalSize, setViewport]); + }, [ + activeImageId, + canvasSize.height, + canvasSize.width, + logicalSize, + setViewport, + ]); const scaleViewportFromCenter = useCallback( (nextScale: number) => {