Update App.tsx

do not delete last element if draggingElement is type selection
zsviczian-fix-top-element-deleted
zsviczian 1 year ago 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)
) {
// 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,
});

Loading…
Cancel
Save