aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/pdf/PDFViewer.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2020-09-09 10:49:51 -0400
committerbobzel <zzzman@gmail.com>2020-09-09 10:49:51 -0400
commit987da6e2479e848c7fb8d63ef6ebb48ee390a298 (patch)
treeb1c134298126017478b4bd44adb2fdbc7878eb8c /src/client/views/pdf/PDFViewer.tsx
parentd5e086e4c161e7d445f6d69faca8ffc7391ed3dd (diff)
fixed link lines to go to text anchors directly
Diffstat (limited to 'src/client/views/pdf/PDFViewer.tsx')
-rw-r--r--src/client/views/pdf/PDFViewer.tsx5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/client/views/pdf/PDFViewer.tsx b/src/client/views/pdf/PDFViewer.tsx
index e0195a100..8afb041b9 100644
--- a/src/client/views/pdf/PDFViewer.tsx
+++ b/src/client/views/pdf/PDFViewer.tsx
@@ -281,7 +281,8 @@ export class PDFViewer extends ViewBoxAnnotatableComponent<IViewerProps, PdfDocu
@action
makeAnnotationDocument = (color: string): Opt<Doc> => {
if (this._savedAnnotations.size() === 0) return undefined;
- let mainAnnoDoc = Docs.Create.InstanceFromProto(new Doc(), "", {});
+ // let mainAnnoDoc = Docs.Create.InstanceFromProto(new Doc(), "", {});
+ let mainAnnoDoc = Docs.Create.FreeformDocument([], { title: "anno", _width: 1, _height: 1 });
let mainAnnoDocProto = Doc.GetProto(mainAnnoDoc);
const annoDocs: Doc[] = [];
let maxX = -Number.MAX_VALUE;
@@ -611,8 +612,8 @@ export class PDFViewer extends ViewBoxAnnotatableComponent<IViewerProps, PdfDocu
dragComplete: e => {
if (!e.aborted && e.annoDragData && !e.annoDragData.linkDocument) {
e.annoDragData.linkDocument = DocUtils.MakeLink({ doc: annotationDoc }, { doc: e.annoDragData.dropDocument }, "Annotation");
- annotationDoc.isLinkButton = true; // prevents link button fro showing up --- maybe not a good thing?
}
+ annotationDoc.isLinkButton = true; // prevents link button fro showing up --- maybe not a good thing?
e.annoDragData && e.annoDragData.linkDocument && e.annoDragData?.linkDropCallback?.({ linkDocument: e.annoDragData.linkDocument });
}
});