diff options
author | brynnchernosky <56202540+brynnchernosky@users.noreply.github.com> | 2023-01-25 19:01:34 -0500 |
---|---|---|
committer | brynnchernosky <56202540+brynnchernosky@users.noreply.github.com> | 2023-01-25 19:01:34 -0500 |
commit | 4fe5eebb3a02ac7cb86a54aa4350ae40cbfdd343 (patch) | |
tree | 6ff64205c634fed55411305b689e92f353c7b14c /src/client/views/nodes/PDFBox.tsx | |
parent | 8d015ff599c145578166dda3013c6aaec1d34450 (diff) | |
parent | 1763ff090ea734ca275c3c28edc6c303c935b801 (diff) |
Merge branch 'master' of github.com:brown-dash/Dash-Web into master
Diffstat (limited to 'src/client/views/nodes/PDFBox.tsx')
-rw-r--r-- | src/client/views/nodes/PDFBox.tsx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/client/views/nodes/PDFBox.tsx b/src/client/views/nodes/PDFBox.tsx index 71ef9bc84..b88ac113e 100644 --- a/src/client/views/nodes/PDFBox.tsx +++ b/src/client/views/nodes/PDFBox.tsx @@ -226,10 +226,11 @@ export class PDFBox extends ViewBoxAnnotatableComponent<ViewBoxAnnotatableProps PresBox.pinDocView(anchor, { pinData: { scrollable: true, pannable: true } }, this.rootDoc); return anchor; }; - const anchor = this._pdfViewer?._getAnchor(this._pdfViewer.savedAnnotations(), false) ?? docAnchor(); + const annoAnchor = this._pdfViewer?._getAnchor(this._pdfViewer.savedAnnotations(), true); + const anchor = annoAnchor ?? docAnchor(); anchor.text = ele?.textContent ?? ''; anchor.textHtml = ele?.innerHTML; - if (addAsAnnotation) { + if (addAsAnnotation || annoAnchor) { this.addDocument(anchor); } return anchor; |