清理预览初始适配无效依赖
移除仅通过 ref 读取的画布尺寸依赖
This commit is contained in:
+1
-1
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user