fix(editor): keep multi-selection on right click
This commit is contained in:
parent
2a5372ecb3
commit
a3655b485a
@ -427,6 +427,10 @@ export function Canvas(props: CanvasProps) {
|
||||
e.stopPropagation();
|
||||
if (node.locked) return;
|
||||
|
||||
// Right-click selection is handled by the contextmenu handler.
|
||||
// Important: don't collapse a multi-selection on pointerdown.
|
||||
if (e.button === 2) return;
|
||||
|
||||
// ctrl click: multi-select toggle
|
||||
if (props.keyboard.ctrl) {
|
||||
props.onToggleSelect(node.id);
|
||||
@ -434,9 +438,6 @@ export function Canvas(props: CanvasProps) {
|
||||
}
|
||||
|
||||
props.onSelectSingle(node.id);
|
||||
// right click should not start move
|
||||
if (e.button === 2) return;
|
||||
|
||||
props.onBeginMove(e);
|
||||
}}
|
||||
onContextMenu={(e) => openContextMenu(e, node.id)}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user