1
0
mirror of https://github.com/excalidraw/excalidraw.git synced 2024-11-02 03:25:53 +01:00

Update App.tsx

do not delete last element if draggingElement is type selection
This commit is contained in:
zsviczian 2023-09-27 21:33:50 +02:00 committed by GitHub
parent 4765f5536e
commit 452cceae40
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -6400,9 +6400,11 @@ class App extends React.Component<AppProps, AppState> {
isInvisiblySmallElement(draggingElement) isInvisiblySmallElement(draggingElement)
) { ) {
// remove invisible element which was added in onPointerDown // remove invisible element which was added in onPointerDown
if (draggingElement.type !== "selection") {
this.scene.replaceAllElements( this.scene.replaceAllElements(
this.scene.getElementsIncludingDeleted().slice(0, -1), this.scene.getElementsIncludingDeleted().slice(0, -1),
); );
}
this.setState({ this.setState({
draggingElement: null, draggingElement: null,
}); });