aboutsummaryrefslogtreecommitdiff
path: root/src/client/util/SelectionManager.ts
diff options
context:
space:
mode:
authorSophie Zhang <sophie_zhang@brown.edu>2024-02-22 10:22:58 -0500
committerSophie Zhang <sophie_zhang@brown.edu>2024-02-22 10:22:58 -0500
commit3f33a680af31a04b58c6163fda53a80a737837c6 (patch)
treeb84da40da1c13c8ab8ab8cd763b69ac5b39ce93c /src/client/util/SelectionManager.ts
parent70cf5ad795055c1f628c918b08a13a96e4ab89a6 (diff)
parentcf85ee4ea73985529a16321d671d893ddb862439 (diff)
Merge branch 'master' into sophie-ai-images
Diffstat (limited to 'src/client/util/SelectionManager.ts')
-rw-r--r--src/client/util/SelectionManager.ts9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/client/util/SelectionManager.ts b/src/client/util/SelectionManager.ts
index f2a327445..36b926053 100644
--- a/src/client/util/SelectionManager.ts
+++ b/src/client/util/SelectionManager.ts
@@ -38,6 +38,7 @@ export class SelectionManager {
this.Instance.SelectedViews.push(docView);
docView.IsSelected = true;
docView._props.whenChildContentsActiveChanged(true);
+ docView.ComponentView?.select?.(false, false);
}
});
@@ -51,9 +52,11 @@ export class SelectionManager {
public static DeselectAll = (except?: Doc): void => {
const found = this.Instance.SelectedViews.find(dv => dv.Document === except);
- LinkManager.currentLink = undefined;
- LinkManager.currentLinkAnchor = undefined;
- runInAction(() => (this.Instance.SelectedSchemaDocument = undefined));
+ runInAction(() => {
+ LinkManager.Instance.currentLink = undefined;
+ LinkManager.Instance.currentLinkAnchor = undefined;
+ this.Instance.SelectedSchemaDocument = undefined;
+ });
this.Instance.SelectedViews.forEach(dv => {
dv.IsSelected = false;
dv._props.whenChildContentsActiveChanged(false);