diff options
| author | bobzel <zzzman@gmail.com> | 2020-09-03 15:59:51 -0400 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2020-09-03 15:59:51 -0400 |
| commit | 3ba4d0b56b5a0428d1b363ee05b419b954a2b071 (patch) | |
| tree | deb25b5e277a6e91d7ec982fb71f2211c7ff6911 /src/client/views/pdf/PDFViewer.tsx | |
| parent | 91a30e512b93937409c2fb3299dc52fc2a87c22a (diff) | |
fixed linking pdf selections to rtf selections.
Diffstat (limited to 'src/client/views/pdf/PDFViewer.tsx')
| -rw-r--r-- | src/client/views/pdf/PDFViewer.tsx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/client/views/pdf/PDFViewer.tsx b/src/client/views/pdf/PDFViewer.tsx index 1d3b3d994..18be9b679 100644 --- a/src/client/views/pdf/PDFViewer.tsx +++ b/src/client/views/pdf/PDFViewer.tsx @@ -609,11 +609,11 @@ export class PDFViewer extends ViewBoxAnnotatableComponent<IViewerProps, PdfDocu if (annotationDoc) { DragManager.StartPdfAnnoDrag([ele], new DragManager.PdfAnnoDragData(this.props.Document, annotationDoc, targetDoc), e.pageX, e.pageY, { dragComplete: e => { - if (!e.aborted && e.annoDragData && !e.annoDragData.linkedToDoc) { - const link = DocUtils.MakeLink({ doc: annotationDoc }, { doc: e.annoDragData.dropDocument }, "Annotation"); + 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? - if (link) Doc.GetProto(link).followLinkLocation = "default"; } + e.annoDragData && e.annoDragData.linkDocument && e.annoDragData?.linkDropCallback?.({ linkDocument: e.annoDragData.linkDocument }); } }); } |
