aboutsummaryrefslogtreecommitdiff
path: root/src/client/util/SelectionManager.ts
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2023-11-18 23:47:13 -0500
committerbobzel <zzzman@gmail.com>2023-11-18 23:47:13 -0500
commit2b0e4ccc096998eb1d727f2e85ea8c1a63b27e08 (patch)
tree1d5bc81e4cf74b20b599a5069c3448a2de4784fb /src/client/util/SelectionManager.ts
parent1b568af6b2725b9eed6f591bfce193d39d5804de (diff)
fixed ctrl-drag for expressions, maps, fform doc selections. fixed using shift to add Doc to a selection and also when bounding box already covers the doc to add. fixed dragging maximize button to start goldenlayout drag properly. fixed typing character to group,etc a multiselection when a text doc has input focus. fixed using clusters. add Shift-U to ungroup alternate group style. multi-select blurs() all active inputs. shift-selecting a multi-selected Doc, deselects it.
Diffstat (limited to 'src/client/util/SelectionManager.ts')
-rw-r--r--src/client/util/SelectionManager.ts13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/client/util/SelectionManager.ts b/src/client/util/SelectionManager.ts
index fcf705ac0..e864458d8 100644
--- a/src/client/util/SelectionManager.ts
+++ b/src/client/util/SelectionManager.ts
@@ -21,18 +21,13 @@ export namespace SelectionManager {
manager.SelectedSchemaDocument = doc;
}
@action
- SelectView(docView: DocumentView, ctrlPressed: boolean): void {
- // if doc is not in SelectedDocuments, add it
+ SelectView(docView: DocumentView, extendSelection: boolean): void {
if (!docView.SELECTED) {
- if (!ctrlPressed) this.DeselectAll();
+ if (!extendSelection) this.DeselectAll();
manager.SelectedViews.push(docView);
- } else if (!ctrlPressed && (manager.SelectedViews.length > 1 || manager.SelectedSchemaDocument)) {
- manager.SelectedViews.filter(dv => dv !== docView).forEach(dv => dv.props.whenChildContentsActiveChanged(false));
- manager.SelectedSchemaDocument = undefined;
- manager.SelectedViews.length = 0;
+ docView.SELECTED = true;
+ docView.props.whenChildContentsActiveChanged(true);
}
- docView.SELECTED = true;
- docView.props.whenChildContentsActiveChanged(true);
}
@action
DeselectView(docView?: DocumentView): void {