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