aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/TabDocView.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2024-05-10 14:05:01 -0400
committerbobzel <zzzman@gmail.com>2024-05-10 14:05:01 -0400
commit4b4d77f99bd55e6de0593c3acd1cf5798ae038bf (patch)
tree0fa27b0344c4252833b9d36dbe69f172141b846e /src/client/views/collections/TabDocView.tsx
parente12f79e188c32787b5749eba54183002f270f998 (diff)
added an always option for OpenWhere lightbox. cleaned up/fixed making collections capable of being a lightbox.
Diffstat (limited to 'src/client/views/collections/TabDocView.tsx')
-rw-r--r--src/client/views/collections/TabDocView.tsx10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/client/views/collections/TabDocView.tsx b/src/client/views/collections/TabDocView.tsx
index afd584154..46f61290e 100644
--- a/src/client/views/collections/TabDocView.tsx
+++ b/src/client/views/collections/TabDocView.tsx
@@ -549,15 +549,7 @@ export class TabDocView extends ObservableReactComponent<TabDocViewProps> {
// prettier-ignore
switch (whereFields[0]) {
case undefined:
- case OpenWhere.lightbox: if (this.layoutDoc?._isLightbox) {
- const lightboxView = !docs[0].annotationOn && DocCast(docs[0].embedContainer) ? DocumentView.getFirstDocumentView(DocCast(docs[0].embedContainer)) : undefined;
- const data = lightboxView?.dataDoc[Doc.LayoutFieldKey(lightboxView.Document)];
- if (lightboxView && (!data || data instanceof List)) {
- lightboxView.layoutDoc[Doc.LayoutFieldKey(lightboxView.Document)] = new List<Doc>(docs);
- return true;
- }
- }
- return LightboxView.Instance.AddDocTab(docs[0], OpenWhere.lightbox);
+ case OpenWhere.lightbox: return LightboxView.Instance.AddDocTab(docs[0], location);
case OpenWhere.close: return CollectionDockingView.CloseSplit(docs[0], whereMods);
case OpenWhere.replace: return CollectionDockingView.ReplaceTab(docs[0], whereMods, this.stack, panelName, undefined, keyValue);
case OpenWhere.toggle: return CollectionDockingView.ToggleSplit(docs[0], whereMods, this.stack, TabDocView.DontSelectOnActivate, keyValue);