Update box create preview condition in ViewportCanvas

This commit is contained in:
2026-04-02 23:05:55 +02:00
parent bb4435814b
commit 6b0bb0fc52

View File

@@ -175,8 +175,8 @@ export function ViewportCanvas({
}, [toolMode]);
useEffect(() => {
hostRef.current?.setBoxCreatePreview(toolPreview.kind === "box-create" ? toolPreview.center : null);
}, [toolPreview]);
hostRef.current?.setBoxCreatePreview(toolMode === "box-create" && toolPreview.kind === "box-create" ? toolPreview.center : null);
}, [toolMode, toolPreview]);
useEffect(() => {
if (focusRequestId === 0) {