diff options
author | vkalev <vjk1883@gmail.com> | 2021-07-15 22:13:41 -0500 |
---|---|---|
committer | vkalev <vjk1883@gmail.com> | 2021-07-15 22:13:41 -0500 |
commit | 0f1e83c036c5ece55179c50251a239daae219771 (patch) | |
tree | 96c2b17e8de0ba06eb47163a30daff02fab92fc6 /src/client/views/nodes/PDFBox.tsx | |
parent | 48620bbe25f92eb179d53846aae5f0164ca6f1c2 (diff) | |
parent | 31a00f5e5d374b8a2945525a75f80f4148c143b7 (diff) |
Merge branch 'master' of https://github.com/brown-dash/Dash-Web into ink-gfx-victor
Merging master changes into ink branch
Diffstat (limited to 'src/client/views/nodes/PDFBox.tsx')
-rw-r--r-- | src/client/views/nodes/PDFBox.tsx | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/client/views/nodes/PDFBox.tsx b/src/client/views/nodes/PDFBox.tsx index feaeb9e21..8f61e252b 100644 --- a/src/client/views/nodes/PDFBox.tsx +++ b/src/client/views/nodes/PDFBox.tsx @@ -23,6 +23,7 @@ import { FieldView, FieldViewProps } from './FieldView'; import { pageSchema } from "./ImageBox"; import "./PDFBox.scss"; import React = require("react"); +import { AnchorMenu } from '../pdf/AnchorMenu'; type PdfDocument = makeInterface<[typeof documentSchema, typeof panZoomSchema, typeof pageSchema]>; const PdfDocument = makeInterface(documentSchema, panZoomSchema, pageSchema); @@ -94,11 +95,13 @@ export class PDFBox extends ViewBoxAnnotatableComponent<ViewBoxAnnotatableProps return this._pdfViewer?.scrollFocus(doc, smooth); } getAnchor = () => { - const anchor = Docs.Create.TextanchorDocument({ - title: StrCast(this.rootDoc.title + " " + this.layoutDoc._scrollTop), - annotationOn: this.rootDoc, - y: NumCast(this.layoutDoc._scrollTop), - }); + const anchor = + AnchorMenu.Instance?.GetAnchor() ?? + Docs.Create.TextanchorDocument({ + title: StrCast(this.rootDoc.title + " " + this.layoutDoc._scrollTop), + annotationOn: this.rootDoc, + y: NumCast(this.layoutDoc._scrollTop), + }); this.addDocument(anchor); return anchor; } |