diff options
author | bob <bcz@cs.brown.edu> | 2019-11-19 11:58:09 -0500 |
---|---|---|
committer | bob <bcz@cs.brown.edu> | 2019-11-19 11:58:09 -0500 |
commit | 185257e441cce6c0d599d95f6fe79cb3deef62d6 (patch) | |
tree | 6b739cb4e62528e6d1d81cbd55ca7524345ae17e /src/client/views/pdf/PDFViewer.tsx | |
parent | d259cf7b16e64794bc12ae420f9b512a75eee46c (diff) |
fixed drawing on images, pdfs, and videos
Diffstat (limited to 'src/client/views/pdf/PDFViewer.tsx')
-rw-r--r-- | src/client/views/pdf/PDFViewer.tsx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/client/views/pdf/PDFViewer.tsx b/src/client/views/pdf/PDFViewer.tsx index 5058ce851..ec8d8be11 100644 --- a/src/client/views/pdf/PDFViewer.tsx +++ b/src/client/views/pdf/PDFViewer.tsx @@ -27,6 +27,8 @@ import { DocAnnotatableComponent } from "../DocComponent"; import { DocumentType } from "../../documents/DocumentTypes"; import { documentSchema } from "../../../new_fields/documentSchemas"; import { DocumentDecorations } from "../DocumentDecorations"; +import { InkingControl } from "../InkingControl"; +import { InkTool } from "../../../new_fields/InkField"; const PDFJSViewer = require("pdfjs-dist/web/pdf_viewer"); const pdfjsLib = require("pdfjs-dist"); @@ -628,7 +630,7 @@ export class PDFViewer extends DocAnnotatableComponent<IViewerProps, PdfDocument panelWidth = () => (this.Document.scrollHeight || this.Document.nativeHeight || 0); panelHeight = () => this._pageSizes.length && this._pageSizes[0] ? this._pageSizes[0].width : (this.Document.nativeWidth || 0); @computed get overlayLayer() { - return <div className="pdfViewer-overlay" id="overlay" style={{ transform: `scale(${this._zoomed})` }}> + return <div className={`pdfViewer-overlay${InkingControl.Instance.selectedTool !== InkTool.None ? "-inking" : ""}`} id="overlay" style={{ transform: `scale(${this._zoomed})` }}> <CollectionFreeFormView {...this.props} annotationsKey={this.annotationsKey} setPreviewCursor={this.setPreviewCursor} @@ -639,7 +641,7 @@ export class PDFViewer extends DocAnnotatableComponent<IViewerProps, PdfDocument isSelected={this.props.isSelected} isAnnotationOverlay={true} select={emptyFunction} - active={this.active} + active={this.annotationsActive} ContentScaling={this.contentZoom} whenActiveChanged={this.whenActiveChanged} removeDocument={this.removeDocument} |