fix(editor): ctrl+alt with lasso over selected elements should keep lassoing

This commit is contained in:
dwelle
2026-03-27 13:43:34 +01:00
parent 22b0f1f918
commit 1e61f1c66a
+12 -5
View File
@@ -7739,17 +7739,24 @@ class App extends React.Component<AppProps, AppState> {
const hitSelectedElement = const hitSelectedElement =
pointerDownState.hit.element && pointerDownState.hit.element &&
this.isASelectedElement(pointerDownState.hit.element); this.isASelectedElement(pointerDownState.hit.element);
const shouldForceLassoReselect =
if ( event.altKey &&
!pointerDownState.hit.hasHitCommonBoundingBoxOfSelectedElements && event[KEYS.CTRL_OR_CMD] &&
!pointerDownState.resize.handleType;
const shouldStartLassoSelection =
shouldForceLassoReselect ||
(!pointerDownState.hit.hasHitCommonBoundingBoxOfSelectedElements &&
!pointerDownState.resize.handleType && !pointerDownState.resize.handleType &&
!hitSelectedElement !hitSelectedElement);
) {
if (shouldStartLassoSelection) {
if (!this.lassoTrail.hasCurrentTrail) {
this.lassoTrail.startPath( this.lassoTrail.startPath(
pointerDownState.origin.x, pointerDownState.origin.x,
pointerDownState.origin.y, pointerDownState.origin.y,
event.shiftKey, event.shiftKey,
); );
}
// block dragging after lasso selection on PCs until the next pointer down // block dragging after lasso selection on PCs until the next pointer down
// (on mobile or tablet, we want to allow user to drag immediately) // (on mobile or tablet, we want to allow user to drag immediately)