|
@@ -7354,7 +7354,18 @@ class App extends React.Component<AppProps, AppState> {
|
|
// on CMD/CTRL, drill down to hit element regardless of groups etc.
|
|
// on CMD/CTRL, drill down to hit element regardless of groups etc.
|
|
if (event[KEYS.CTRL_OR_CMD]) {
|
|
if (event[KEYS.CTRL_OR_CMD]) {
|
|
if (event.altKey) {
|
|
if (event.altKey) {
|
|
- // ctrl + alt means we're lasso selecting
|
|
|
|
|
|
+ // ctrl + alt means we're lasso selecting - start lasso trail and switch to lasso tool
|
|
|
|
+
|
|
|
|
+ // Close any open dialogs that might interfere with lasso selection
|
|
|
|
+ if (this.state.openDialog?.name === "elementLinkSelector") {
|
|
|
|
+ this.setOpenDialog(null);
|
|
|
|
+ }
|
|
|
|
+ this.lassoTrail.startPath(
|
|
|
|
+ pointerDownState.origin.x,
|
|
|
|
+ pointerDownState.origin.y,
|
|
|
|
+ event.shiftKey,
|
|
|
|
+ );
|
|
|
|
+ this.setActiveTool({ type: "lasso", fromSelection: true });
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
if (!this.state.selectedElementIds[hitElement.id]) {
|
|
if (!this.state.selectedElementIds[hitElement.id]) {
|
|
@@ -8384,8 +8395,10 @@ class App extends React.Component<AppProps, AppState> {
|
|
pointerDownState.hit.element)
|
|
pointerDownState.hit.element)
|
|
) {
|
|
) {
|
|
const selectedElements = this.scene.getSelectedElements(this.state);
|
|
const selectedElements = this.scene.getSelectedElements(this.state);
|
|
-
|
|
|
|
- if (selectedElements.every((element) => element.locked)) {
|
|
|
|
|
|
+ if (
|
|
|
|
+ selectedElements.length > 0 &&
|
|
|
|
+ selectedElements.every((element) => element.locked)
|
|
|
|
+ ) {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -8406,8 +8419,14 @@ class App extends React.Component<AppProps, AppState> {
|
|
// if elements should be deselected on pointerup
|
|
// if elements should be deselected on pointerup
|
|
pointerDownState.drag.hasOccurred = true;
|
|
pointerDownState.drag.hasOccurred = true;
|
|
|
|
|
|
- // Clear lasso trail when starting to drag with lasso tool
|
|
|
|
- if (this.state.activeTool.type === "lasso") {
|
|
|
|
|
|
+ // Clear lasso trail when starting to drag selected elements with lasso tool
|
|
|
|
+ // Only clear if we're actually dragging (not during lasso selection)
|
|
|
|
+ if (
|
|
|
|
+ this.state.activeTool.type === "lasso" &&
|
|
|
|
+ selectedElements.length > 0 &&
|
|
|
|
+ pointerDownState.drag.hasOccurred &&
|
|
|
|
+ !this.state.activeTool.fromSelection
|
|
|
|
+ ) {
|
|
this.lassoTrail.endPath();
|
|
this.lassoTrail.endPath();
|
|
}
|
|
}
|
|
|
|
|