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:
parent
4765f5536e
commit
452cceae40
@ -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,
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user