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