aboutsummaryrefslogtreecommitdiff
path: root/src/client/util/SelectionManager.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/util/SelectionManager.ts')
-rw-r--r--src/client/util/SelectionManager.ts10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/client/util/SelectionManager.ts b/src/client/util/SelectionManager.ts
index 07bbde36c..53e4a2853 100644
--- a/src/client/util/SelectionManager.ts
+++ b/src/client/util/SelectionManager.ts
@@ -33,17 +33,17 @@ export class SelectionManager {
public static SelectView = action((docView: DocumentView | undefined, extendSelection: boolean): void => {
if (!docView) this.DeselectAll();
- else if (!docView.SELECTED) {
+ else if (!docView.IsSelected) {
if (!extendSelection) this.DeselectAll();
this.Instance.SelectedViews.push(docView);
- docView.SELECTED = true;
+ docView.IsSelected = true;
docView._props.whenChildContentsActiveChanged(true);
}
});
public static DeselectView = action((docView?: DocumentView): void => {
if (docView && this.Instance.SelectedViews.includes(docView)) {
- docView.SELECTED = false;
+ docView.IsSelected = false;
this.Instance.SelectedViews.splice(this.Instance.SelectedViews.indexOf(docView), 1);
docView._props.whenChildContentsActiveChanged(false);
}
@@ -55,14 +55,14 @@ export class SelectionManager {
LinkManager.currentLinkAnchor = undefined;
runInAction(() => (this.Instance.SelectedSchemaDocument = undefined));
this.Instance.SelectedViews.forEach(dv => {
- dv.SELECTED = false;
+ dv.IsSelected = false;
dv._props.whenChildContentsActiveChanged(false);
});
this.Instance.SelectedViews.length = 0;
if (found) this.SelectView(found, false);
};
- public static IsSelected = (doc?: Doc) => Array.from(doc?.[DocViews] ?? []).some(dv => dv?.SELECTED);
+ public static IsSelected = (doc?: Doc) => Array.from(doc?.[DocViews] ?? []).some(dv => dv?.IsSelected);
public static get Views() { return this.Instance.SelectedViews; } // prettier-ignore
public static get SelectedSchemaDoc() { return this.Instance.SelectedSchemaDocument; } // prettier-ignore
public static get Docs() { return this.Instance.SelectedViews.map(dv => dv.Document).filter(doc => doc?._type_collection !== CollectionViewType.Docking); } // prettier-ignore