|
@@ -4534,9 +4534,8 @@ class App extends React.Component<AppProps, AppState> {
|
|
|
if (this.state.editingLinearElement) {
|
|
|
if (
|
|
|
!pointerDownState.boxSelection.hasOccurred &&
|
|
|
- (pointerDownState.hit?.element?.id !==
|
|
|
- this.state.editingLinearElement.elementId ||
|
|
|
- !pointerDownState.hit.hasHitElementInside)
|
|
|
+ pointerDownState.hit?.element?.id !==
|
|
|
+ this.state.editingLinearElement.elementId
|
|
|
) {
|
|
|
this.actionManager.executeAction(actionFinalize);
|
|
|
} else {
|
|
@@ -4554,10 +4553,8 @@ class App extends React.Component<AppProps, AppState> {
|
|
|
}
|
|
|
} else if (this.state.selectedLinearElement) {
|
|
|
if (
|
|
|
- !pointerDownState.boxSelection.hasOccurred &&
|
|
|
- (pointerDownState.hit?.element?.id !==
|
|
|
- this.state.selectedLinearElement.elementId ||
|
|
|
- !pointerDownState.hit.hasHitElementInside)
|
|
|
+ pointerDownState.hit?.element?.id !==
|
|
|
+ this.state.selectedLinearElement.elementId
|
|
|
) {
|
|
|
const selectedELements = getSelectedElements(
|
|
|
this.scene.getNonDeletedElements(),
|
|
@@ -4937,7 +4934,6 @@ class App extends React.Component<AppProps, AppState> {
|
|
|
}
|
|
|
|
|
|
if (
|
|
|
- !this.state.editingLinearElement &&
|
|
|
!pointerDownState.drag.hasOccurred &&
|
|
|
!this.state.isResizing &&
|
|
|
((hitElement &&
|
|
@@ -4950,13 +4946,16 @@ class App extends React.Component<AppProps, AppState> {
|
|
|
(!hitElement &&
|
|
|
pointerDownState.hit.hasHitCommonBoundingBoxOfSelectedElements))
|
|
|
) {
|
|
|
- // Deselect selected elements
|
|
|
- this.setState({
|
|
|
- selectedElementIds: {},
|
|
|
- selectedGroupIds: {},
|
|
|
- editingGroupId: null,
|
|
|
- });
|
|
|
-
|
|
|
+ if (this.state.editingLinearElement) {
|
|
|
+ this.setState({ editingLinearElement: null });
|
|
|
+ } else {
|
|
|
+ // Deselect selected elements
|
|
|
+ this.setState({
|
|
|
+ selectedElementIds: {},
|
|
|
+ selectedGroupIds: {},
|
|
|
+ editingGroupId: null,
|
|
|
+ });
|
|
|
+ }
|
|
|
return;
|
|
|
}
|
|
|
|