diff options
author | bobzel <zzzman@gmail.com> | 2024-10-01 19:40:50 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2024-10-01 19:40:50 -0400 |
commit | e29b76c89532aefaa27c9950981f6405ac3899d9 (patch) | |
tree | 7cb437ca67c81e4e0a610dfadcfe632ed6974d70 /src/client/views/pdf/PDFViewer.tsx | |
parent | 92d13a93ec871f3f3048b7344528e618845ad76f (diff) | |
parent | 45edcb10855ba5a5313ccf2e60c5ba3590d7bcbc (diff) |
Merge branch 'master' into alyssa-starter
Diffstat (limited to 'src/client/views/pdf/PDFViewer.tsx')
-rw-r--r-- | src/client/views/pdf/PDFViewer.tsx | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/client/views/pdf/PDFViewer.tsx b/src/client/views/pdf/PDFViewer.tsx index 477157cce..0876275d9 100644 --- a/src/client/views/pdf/PDFViewer.tsx +++ b/src/client/views/pdf/PDFViewer.tsx @@ -587,6 +587,14 @@ export class PDFViewer extends ObservableReactComponent<IViewerProps> { // allows for creating collection AnchorMenu.Instance.addToCollection = this._props.DocumentView?.()._props.addDocument; AnchorMenu.Instance.gptFlashcards = this.gptPDFFlashcards; + AnchorMenu.Instance.AddDrawingAnnotation = this.addDrawingAnnotation; + }; + + addDrawingAnnotation = (drawing: Doc) => { + // drawing[DocData].x = this._props.pdfBox.ScreenToLocalBoxXf().TranslateX + // const scaleX = this._mainCont.current.offsetWidth / boundingRect.width; + drawing.y = NumCast(drawing.y) + NumCast(this._props.Document.layout_scrollTop); + this._props.addDocument?.(drawing); }; @action @@ -678,7 +686,6 @@ export class PDFViewer extends ObservableReactComponent<IViewerProps> { if (this.inlineTextAnnotations.includes(doc) || this._props.isContentActive() === false) return 'none'; const isInk = doc.layout_isSvg && !props?.LayoutTemplateString; if (isInk) return 'visiblePainted'; - //return isInk ? 'visiblePainted' : 'all'; } return this._props.styleProvider?.(doc, props, property); }; |