mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Fix group element removing (#1676)
This commit is contained in:
parent
17e9cc4506
commit
f413bab3de
11 changed files with 478 additions and 43 deletions
|
@ -30,7 +30,6 @@ import {
|
|||
isNonDeletedElement,
|
||||
} from "../element";
|
||||
import {
|
||||
deleteSelectedElements,
|
||||
getElementsWithinSelection,
|
||||
isOverScrollBars,
|
||||
getElementAtPosition,
|
||||
|
@ -126,7 +125,7 @@ import { invalidateShapeForElement } from "../renderer/renderElement";
|
|||
import { unstable_batchedUpdates } from "react-dom";
|
||||
import { SceneStateCallbackRemover } from "../scene/globalScene";
|
||||
import { isLinearElement } from "../element/typeChecks";
|
||||
import { actionFinalize } from "../actions";
|
||||
import { actionFinalize, actionDeleteSelected } from "../actions";
|
||||
import {
|
||||
restoreUsernameFromLocalStorage,
|
||||
saveUsernameToLocalStorage,
|
||||
|
@ -593,13 +592,7 @@ class App extends React.Component<any, AppState> {
|
|||
return;
|
||||
}
|
||||
this.copyAll();
|
||||
const { elements: nextElements, appState } = deleteSelectedElements(
|
||||
globalSceneState.getElementsIncludingDeleted(),
|
||||
this.state,
|
||||
);
|
||||
globalSceneState.replaceAllElements(nextElements);
|
||||
history.resumeRecording();
|
||||
this.setState({ ...appState });
|
||||
this.actionManager.executeAction(actionDeleteSelected);
|
||||
event.preventDefault();
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue