diff options
author | eleanor-park <eleanor_park@brown.edu> | 2025-01-14 17:25:47 +0100 |
---|---|---|
committer | eleanor-park <eleanor_park@brown.edu> | 2025-01-14 17:25:47 +0100 |
commit | 85f60319ba7020b2976ed1063915a145a09ab381 (patch) | |
tree | 60a1c2270717ff4a5e89fd079bdad1ad139ca4f7 /src/client/util/SelectionManager.ts | |
parent | 859bb1b733901e4697f1d53781af725e4830c607 (diff) | |
parent | 12f5a435ee6476e2e07ded0c9cdd597c70ca8af0 (diff) |
Merge branch 'eleanor-gptdraw' of https://github.com/brown-dash/Dash-Web into eleanor-gptdraw
Diffstat (limited to 'src/client/util/SelectionManager.ts')
-rw-r--r-- | src/client/util/SelectionManager.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/client/util/SelectionManager.ts b/src/client/util/SelectionManager.ts index 1ab84421c..a1f2849cd 100644 --- a/src/client/util/SelectionManager.ts +++ b/src/client/util/SelectionManager.ts @@ -88,7 +88,8 @@ ScriptingGlobals.add(function SelectedDocType(type: string, expertMode: boolean, return DocumentView.Selected().lastElement()?._props.renderDepth === 0; } const selected = (sel => (checkContext ? DocCast(sel?.embedContainer) : sel))(DocumentView.SelectedSchemaDoc() ?? SelectionManager.Docs().lastElement()); - return selected?.type === type || selected?.type_collection === type || !type; + const matchOverlayFreeform = type === CollectionViewType.Freeform && DocumentView.Selected().lastElement()?.ComponentView?.annotationKey; + return matchOverlayFreeform || selected?.type === type || selected?.type_collection === type || !type; }); // eslint-disable-next-line prefer-arrow-callback ScriptingGlobals.add(function deselectAll() { |