Update box create preview condition in ViewportCanvas
This commit is contained in:
@@ -175,8 +175,8 @@ export function ViewportCanvas({
|
|||||||
}, [toolMode]);
|
}, [toolMode]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
hostRef.current?.setBoxCreatePreview(toolPreview.kind === "box-create" ? toolPreview.center : null);
|
hostRef.current?.setBoxCreatePreview(toolMode === "box-create" && toolPreview.kind === "box-create" ? toolPreview.center : null);
|
||||||
}, [toolPreview]);
|
}, [toolMode, toolPreview]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (focusRequestId === 0) {
|
if (focusRequestId === 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user