diff options
author | bobzel <zzzman@gmail.com> | 2020-10-07 11:32:23 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2020-10-07 11:32:23 -0400 |
commit | c6e407d7ab92244964c2fad05b6a68d124bf18df (patch) | |
tree | 2386a95c2f125b70b1ae22c59ae4f24e2c78375a /src/client/util/DocumentManager.ts | |
parent | c8cb8b63764bba4a1d885745f53ee43ae78c2d46 (diff) |
fixed following links to not center outer document if originating anchor is in that document. fixed scroling to happen instantly if it's already scrolled there. fixed clicking on pdf text anchor to select the pdf.
Diffstat (limited to 'src/client/util/DocumentManager.ts')
-rw-r--r-- | src/client/util/DocumentManager.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/client/util/DocumentManager.ts b/src/client/util/DocumentManager.ts index cb9aa35d0..4becdf4a3 100644 --- a/src/client/util/DocumentManager.ts +++ b/src/client/util/DocumentManager.ts @@ -151,7 +151,7 @@ export class DocumentManager { }; const docView = getFirstDocView(targetDoc, originatingDoc); let annotatedDoc = await Cast(targetDoc.annotationOn, Doc); - if (annotatedDoc && annotatedDoc !== docContext && !targetDoc?.isPushpin) { + if (annotatedDoc && annotatedDoc !== originatingDoc?.context && !targetDoc?.isPushpin) { const first = getFirstDocView(annotatedDoc); if (first) { annotatedDoc = first.props.Document; @@ -166,7 +166,8 @@ export class DocumentManager { else { docView.select(false); docView.props.Document.hidden && (docView.props.Document.hidden = undefined); - docView.props.focus(docView.props.Document, willZoom, undefined, focusAndFinish); + // @ts-ignore + docView.props.focus(docView.props.Document, willZoom, undefined, focusAndFinish, annotatedDoc && annotatedDoc === originatingDoc?.context); highlight(); } } else { |