From 452cceae406155af24544117ec69a95fb17740ab Mon Sep 17 00:00:00 2001 From: zsviczian Date: Wed, 27 Sep 2023 21:33:50 +0200 Subject: [PATCH] Update App.tsx do not delete last element if draggingElement is type selection --- src/components/App.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/components/App.tsx b/src/components/App.tsx index 7736c3497..999f2d314 100644 --- a/src/components/App.tsx +++ b/src/components/App.tsx @@ -6400,9 +6400,11 @@ class App extends React.Component { isInvisiblySmallElement(draggingElement) ) { // remove invisible element which was added in onPointerDown - this.scene.replaceAllElements( - this.scene.getElementsIncludingDeleted().slice(0, -1), - ); + if (draggingElement.type !== "selection") { + this.scene.replaceAllElements( + this.scene.getElementsIncludingDeleted().slice(0, -1), + ); + } this.setState({ draggingElement: null, });