diff options
| author | Tyler Schicke <tyler_schicke@brown.edu> | 2019-07-15 17:20:55 -0400 |
|---|---|---|
| committer | Tyler Schicke <tyler_schicke@brown.edu> | 2019-07-15 17:20:55 -0400 |
| commit | ce12312c415da1460419b7a4fdb73fdacf28106a (patch) | |
| tree | adc0fd1786c824606023e6dfc2737fb6531a3ed6 /src/client/views/pdf | |
| parent | b72dfe96af4f87fa00e9d64ffded62d0a5ec0ea9 (diff) | |
| parent | 0b64d73bc4e9b081a820fe64649df22b65501e37 (diff) | |
Merge branch 'master' of github-tsch-brown:browngraphicslab/Dash-Web
Diffstat (limited to 'src/client/views/pdf')
| -rw-r--r-- | src/client/views/pdf/PDFViewer.tsx | 1 | ||||
| -rw-r--r-- | src/client/views/pdf/Page.tsx | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/src/client/views/pdf/PDFViewer.tsx b/src/client/views/pdf/PDFViewer.tsx index 01fd1c247..c560e581c 100644 --- a/src/client/views/pdf/PDFViewer.tsx +++ b/src/client/views/pdf/PDFViewer.tsx @@ -278,6 +278,7 @@ export class Viewer extends React.Component<IViewerProps> { if (de.data instanceof DragManager.LinkDragData) { let sourceDoc = de.data.linkSourceDocument; let destDoc = this.makeAnnotationDocument(sourceDoc, 1, "red"); + de.data.droppedDocuments.push(destDoc); let targetAnnotations = DocListCast(this.props.parent.fieldExtensionDoc.annotations); if (targetAnnotations) { targetAnnotations.push(destDoc); diff --git a/src/client/views/pdf/Page.tsx b/src/client/views/pdf/Page.tsx index 3d8973414..c9d442fe5 100644 --- a/src/client/views/pdf/Page.tsx +++ b/src/client/views/pdf/Page.tsx @@ -176,6 +176,10 @@ export default class Page extends React.Component<IPageProps> { anno.target = targetDoc; }); } + let pdfDoc = await Cast(annotationDoc.pdfDoc, Doc); + if (pdfDoc) { + DocUtils.MakeLink(annotationDoc, targetDoc, undefined, `Annotation from ${StrCast(pdfDoc.title)}`, "", StrCast(pdfDoc.title)); + } } } }, |
