Skip to content

Commit

Permalink
fix(composer): fix adding tag always attached to root (#281)
Browse files Browse the repository at this point in the history
  • Loading branch information
sheilaXu committed Oct 18, 2022
1 parent ecbedc0 commit 775446a
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export const AddObjectMenu = () => {

const selectedSceneNode = useMemo(() => {
return getSceneNodeByRef(selectedSceneNodeRef);
}, [selectedSceneNodeRef]);
}, [getSceneNodeByRef, selectedSceneNodeRef]);

const sceneContainsEnvironmentModel = useMemo(() => {
return (
Expand Down Expand Up @@ -135,7 +135,7 @@ export const AddObjectMenu = () => {

const getRefForParenting = useCallback(() => {
return !isEnvironmentNode(selectedSceneNode) ? selectedSceneNodeRef : undefined;
}, [getSceneNodeByRef, selectedSceneNodeRef, selectedSceneNode]);
}, [selectedSceneNodeRef, selectedSceneNode]);

const handleAddAnchor = useCallback(() => {
const anchorComponent: IAnchorComponent = {
Expand All @@ -151,7 +151,7 @@ export const AddObjectMenu = () => {
} else {
appendSceneNode(node);
}
}, [enhancedEditingEnabled]);
}, [enhancedEditingEnabled, getRefForParenting, appendSceneNode, setAddingWidget]);

const handleAddColorOverlay = () => {
// Requires a selected scene node
Expand Down

0 comments on commit 775446a

Please sign in to comment.