Refactor ViewportCanvas hooks to separate document and selection updates
This commit is contained in:
@@ -197,12 +197,12 @@ export function ViewportCanvas({
|
|||||||
}, [whiteboxSelectionMode]);
|
}, [whiteboxSelectionMode]);
|
||||||
|
|
||||||
useLayoutEffect(() => {
|
useLayoutEffect(() => {
|
||||||
hostRef.current?.updateDocument(
|
hostRef.current?.updateSelection(selection, activeSelectionId);
|
||||||
sceneDocument,
|
}, [selection, activeSelectionId]);
|
||||||
selection,
|
|
||||||
activeSelectionId
|
useLayoutEffect(() => {
|
||||||
);
|
hostRef.current?.updateDocument(sceneDocument);
|
||||||
}, [sceneDocument, selection, activeSelectionId]);
|
}, [sceneDocument]);
|
||||||
|
|
||||||
useLayoutEffect(() => {
|
useLayoutEffect(() => {
|
||||||
hostRef.current?.setViewMode(viewMode);
|
hostRef.current?.setViewMode(viewMode);
|
||||||
|
|||||||
Reference in New Issue
Block a user