清理预览初始适配无效依赖

移除仅通过 ref 读取的画布尺寸依赖
This commit is contained in:
2026-09-18 17:14:16 +08:00
parent 70c65c37d5
commit 8fdf39f37e
@@ -216,7 +216,7 @@ export function PreviewWorkspace({
height: element?.clientHeight || canvasSizeRef.current.height,
};
setViewport(fitEditorViewport(allBounds, canvasSize));
}, [allBounds, canvasSize.height, canvasSize.width, setViewport]);
}, [allBounds, setViewport]);
const scaleViewportFromCenter = useCallback(
(nextScale: number) => {