diff options
author | bobzel <zzzman@gmail.com> | 2024-05-10 14:05:01 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2024-05-10 14:05:01 -0400 |
commit | 4b4d77f99bd55e6de0593c3acd1cf5798ae038bf (patch) | |
tree | 0fa27b0344c4252833b9d36dbe69f172141b846e /src/client/util/DocumentManager.ts | |
parent | e12f79e188c32787b5749eba54183002f270f998 (diff) |
added an always option for OpenWhere lightbox. cleaned up/fixed making collections capable of being a lightbox.
Diffstat (limited to 'src/client/util/DocumentManager.ts')
-rw-r--r-- | src/client/util/DocumentManager.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/util/DocumentManager.ts b/src/client/util/DocumentManager.ts index 97051207b..09a8194ca 100644 --- a/src/client/util/DocumentManager.ts +++ b/src/client/util/DocumentManager.ts @@ -264,11 +264,11 @@ export class DocumentManager { (!DocumentView.LightboxDoc() && docContextPath.some(doc => DocumentView.activateTabView(doc))) || DocumentViewInternal.addDocTabFunc(docContextPath[0], options.openLocation ?? OpenWhere.addRight); this.AddViewRenderedCb(docContextPath[0], dv => res(dv)); })); - if (options.openLocation === OpenWhere.lightbox) { + if (options.openLocation?.includes(OpenWhere.lightbox)) { // even if we found the document view, if the target is a lightbox, we try to open it in the lightbox to preserve lightbox semantics (eg, there's only one active doc in the lightbox) const target = DocCast(targetDoc.annotationOn, targetDoc); const contextView = this.getDocumentView(DocCast(target.embedContainer)); - if (contextView?.ComponentView?.addDocTab?.(target, OpenWhere.lightbox)) { + if (contextView?.ComponentView?.addDocTab?.(target, options.openLocation)) { await new Promise<void>(waitres => { setTimeout(() => waitres()); }); |