diff options
author | Jenny Yu <jennyyu212@outlook.com> | 2022-09-12 21:57:15 -0400 |
---|---|---|
committer | Jenny Yu <jennyyu212@outlook.com> | 2022-09-12 21:57:15 -0400 |
commit | 7da791491a588f2a2a177a4eb144311ba49f5782 (patch) | |
tree | ec715830946f7e1329135ff12be2c1d66ac65149 /src/client/util/SelectionManager.ts | |
parent | 7f0eacf3fc0b54ceb4d574a719208861789581d3 (diff) | |
parent | 4315a0378bc54ae9eaa684d416839f635c38e865 (diff) |
Merge branch 'master' into sharing-jenny (break)
Diffstat (limited to 'src/client/util/SelectionManager.ts')
-rw-r--r-- | src/client/util/SelectionManager.ts | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/client/util/SelectionManager.ts b/src/client/util/SelectionManager.ts index 1c84af94a..7a555d5f8 100644 --- a/src/client/util/SelectionManager.ts +++ b/src/client/util/SelectionManager.ts @@ -101,6 +101,9 @@ export namespace SelectionManager { } } ScriptingGlobals.add(function SelectionManager_selectedDocType(docType?: DocumentType, colType?: CollectionViewType, checkContext?: boolean) { + if (colType === ('tab' as any)) { + return SelectionManager.Views().lastElement()?.props.renderDepth === 0; + } let selected = (sel => (checkContext ? DocCast(sel?.context) : sel))(SelectionManager.SelectedSchemaDoc() ?? SelectionManager.Docs().lastElement()); return docType ? selected?.type === docType : colType ? selected?.viewType === colType : true; }); |