Skip to content

Commit

Permalink
fix(composer): Enhanced Edit now allows for undo operation (#376)
Browse files Browse the repository at this point in the history
  • Loading branch information
jwills-jdubs committed Nov 16, 2022
1 parent 8c90889 commit 5e73bb8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ export const WebGLCanvasManager: React.FC = () => {
const { position } = getIntersectionTransform(e.intersections[0]);
const newWidgetNode = createNodeWithPositionAndNormal(addingWidget, position, new THREE.Vector3());

appendSceneNode(newWidgetNode);
setAddingWidget(undefined);
appendSceneNode(newWidgetNode);

e.stopPropagation();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,9 @@ export const GLTFModelComponent: React.FC<GLTFModelProps> = ({
physicalParent,
hierarchicalParent?.userData.nodeRef,
);
appendSceneNode(newWidgetNode);

setAddingWidget(undefined);
appendSceneNode(newWidgetNode);
e.stopPropagation();
}
};
Expand Down

0 comments on commit 5e73bb8

Please sign in to comment.