Add escape key handling to cancel placement preview in App.tsx
This commit is contained in:
@@ -1251,6 +1251,13 @@ export function App({ store, initialStatusMessage }: AppProps) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (event.key === "Escape" && editorState.toolMode === "place") {
|
||||
event.preventDefault();
|
||||
store.setToolMode("select");
|
||||
setStatusMessage("Cancelled the current placement preview.");
|
||||
return;
|
||||
}
|
||||
|
||||
if (event.shiftKey && event.code === "KeyA") {
|
||||
event.preventDefault();
|
||||
setAddMenuPosition({
|
||||
@@ -1686,10 +1693,6 @@ export function App({ store, initialStatusMessage }: AppProps) {
|
||||
setStatusMessage(successMessage);
|
||||
};
|
||||
|
||||
const handlePlaceModelInstance = (assetId: string) => {
|
||||
beginModelInstancePlacement(assetId);
|
||||
};
|
||||
|
||||
const applyModelInstanceChange = () => {
|
||||
if (selectedModelInstance === null) {
|
||||
setStatusMessage("Select a model instance before editing it.");
|
||||
|
||||
Reference in New Issue
Block a user