diff options
| author | bobzel <zzzman@gmail.com> | 2022-11-17 14:35:13 -0500 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2022-11-17 14:35:13 -0500 |
| commit | b7d4f932d826d48aca4c7c058e05ceaea9c43057 (patch) | |
| tree | 53ca37a39061bb00ecf4f0fb40a26dd10c8035ba /src/client/util/LinkFollower.ts | |
| parent | 30e7fc1b2cb4b5c5f8d5f5e4f808b91e69629245 (diff) | |
mostly changing strings to enums
Diffstat (limited to 'src/client/util/LinkFollower.ts')
| -rw-r--r-- | src/client/util/LinkFollower.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/util/LinkFollower.ts b/src/client/util/LinkFollower.ts index 68716a207..a3eb7ed7a 100644 --- a/src/client/util/LinkFollower.ts +++ b/src/client/util/LinkFollower.ts @@ -4,7 +4,7 @@ import { BoolCast, Cast, DocCast, StrCast } from '../../fields/Types'; import { DocumentType } from '../documents/DocumentTypes'; import { DocumentDecorations } from '../views/DocumentDecorations'; import { LightboxView } from '../views/LightboxView'; -import { DocumentViewSharedProps, ViewAdjustment } from '../views/nodes/DocumentView'; +import { DocumentViewSharedProps, OpenWhere, ViewAdjustment } from '../views/nodes/DocumentView'; import { DocumentManager } from './DocumentManager'; import { LinkManager } from './LinkManager'; import { UndoManager } from './UndoManager'; @@ -32,7 +32,7 @@ export class LinkFollower { const createViewFunc = (doc: Doc, followLoc: string, finished?: Opt<() => void>) => { const createTabForTarget = (didFocus: boolean) => new Promise<ViewAdjustment>(res => { - const where = LightboxView.LightboxDoc ? 'inPlace' : StrCast(sourceDoc.followLinkLocation, followLoc); + const where = LightboxView.LightboxDoc ? OpenWhere.inPlace : (StrCast(sourceDoc.followLinkLocation, followLoc) as OpenWhere); docViewProps.addDocTab(doc, where); setTimeout(() => { const targDocView = DocumentManager.Instance.getFirstDocumentView(doc); // get first document view available within the lightbox if that's open, or anywhere otherwise. |
