diff options
author | bobzel <zzzman@gmail.com> | 2021-02-11 02:38:23 -0500 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2021-02-11 02:38:23 -0500 |
commit | 42865450ea252e340d89a1f67c8a2dc0b9c6eae3 (patch) | |
tree | 57b6179b2b4b43702602a0a8571ec90353898c02 /src/client/util/DocumentManager.ts | |
parent | c86cb3966ecb905c2dc6a6236b71d7ce9c8fb80f (diff) |
more tweaking to simplify link following mechanisms.
Diffstat (limited to 'src/client/util/DocumentManager.ts')
-rw-r--r-- | src/client/util/DocumentManager.ts | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/src/client/util/DocumentManager.ts b/src/client/util/DocumentManager.ts index e5ef924d6..5d3f8af57 100644 --- a/src/client/util/DocumentManager.ts +++ b/src/client/util/DocumentManager.ts @@ -172,18 +172,7 @@ export class DocumentManager { first.focus(targetDoc, false); } } else if (docView && (targetDocContextView || !targetDocContext)) { // we have a docView already and aren't forced to create a new one ... just focus on the document. TODO move into view if necessary otherwise just highlight? - const first = annotatedDoc && getFirstDocView(annotatedDoc); - const targetFocus = (outFocus?: boolean) => docView.props.focus(docView.rootDoc, willZoom, undefined, (didFocus: boolean) => focusAndFinish(outFocus || didFocus)); - const annoFocus = (outFocus?: boolean) => first?.props.focus(first.rootDoc, false, undefined, (didFocus: boolean) => { - targetFocus(outFocus || didFocus); - return false; - }); - const contextFocus = targetDocContext === annotatedDoc ? undefined : (outFocus?: boolean) => targetDocContextView?.props.focus(targetDocContext, false, undefined, (didFocus: boolean) => { - annoFocus(outFocus || didFocus); - return false; - }); - (contextFocus || annoFocus || targetFocus)(); - highlight(); + docView.props.focus(docView.rootDoc, willZoom, undefined, (didFocus: boolean) => focusAndFinish(didFocus)); } else { if (!targetDocContext) { // we don't have a view and there's no context specified ... create a new view of the target using the dockFunc or default createViewFunc(Doc.BrushDoc(targetDoc), finished); // bcz: should we use this?: Doc.MakeAlias(targetDoc))); |