Update viewport-host.ts to handle shift key for selection changes

This commit is contained in:
2026-04-15 14:47:27 +02:00
parent e92f25de31
commit a0cd36e4bf

View File

@@ -6019,9 +6019,13 @@ export class ViewportHost {
if (candidates.length === 0) { if (candidates.length === 0) {
this.lastClickPointer = null; this.lastClickPointer = null;
this.lastClickSelectionKey = null; this.lastClickSelectionKey = null;
this.brushSelectionChangeHandler?.({
kind: "none" if (!event.shiftKey) {
}); this.brushSelectionChangeHandler?.({
kind: "none"
});
}
return; return;
} }
@@ -6048,7 +6052,13 @@ export class ViewportHost {
const chosen = candidates[candidateIndex]; const chosen = candidates[candidateIndex];
this.lastClickSelectionKey = chosen.key; this.lastClickSelectionKey = chosen.key;
this.brushSelectionChangeHandler?.(chosen.selection); this.brushSelectionChangeHandler?.(
applySameKindSelectionClick(
this.currentSelection,
chosen.selection,
event.shiftKey
)
);
}; };
private handlePointerMove = (event: PointerEvent) => { private handlePointerMove = (event: PointerEvent) => {