diff options
| author | bob <bcz@cs.brown.edu> | 2019-08-07 18:15:38 -0400 |
|---|---|---|
| committer | bob <bcz@cs.brown.edu> | 2019-08-07 18:15:38 -0400 |
| commit | 941c50617a0cbaef054f2be856de013bd69ea81f (patch) | |
| tree | 15d88432804991ef681b2c68368521ceb2c90c45 /src/client/views/pdf/Page.tsx | |
| parent | 243beedb3a9e8be526d026fade0e8d48b507148a (diff) | |
pdf annotaitons
Diffstat (limited to 'src/client/views/pdf/Page.tsx')
| -rw-r--r-- | src/client/views/pdf/Page.tsx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/client/views/pdf/Page.tsx b/src/client/views/pdf/Page.tsx index 6de2db427..4986f44d5 100644 --- a/src/client/views/pdf/Page.tsx +++ b/src/client/views/pdf/Page.tsx @@ -24,7 +24,7 @@ interface IPageProps { renderAnnotations: (annotations: Doc[], removeOld: boolean) => void; sendAnnotations: (annotations: HTMLDivElement[], page: number) => void; createAnnotation: (div: HTMLDivElement, page: number) => void; - makeAnnotationDocuments: (doc: Doc | undefined, scale: number, color: string, linkTo: boolean) => Doc; + makeAnnotationDocuments: (doc: Doc | undefined, color: string, linkTo: boolean) => Doc; getScrollFromPage: (page: number) => number; setSelectionText: (text: string) => void; } @@ -87,7 +87,7 @@ export default class Page extends React.Component<IPageProps> { @action highlight = (targetDoc: Doc | undefined, color: string) => { // creates annotation documents for current highlights - let annotationDoc = this.props.makeAnnotationDocuments(targetDoc, scale, color, false); + let annotationDoc = this.props.makeAnnotationDocuments(targetDoc, color, false); Doc.AddDocToList(this.props.fieldExtensionDoc, "annotations", annotationDoc); return annotationDoc; } @@ -143,7 +143,7 @@ export default class Page extends React.Component<IPageProps> { @action onPointerDown = (e: React.PointerEvent): void => { // if alt+left click, drag and annotate - if (this.props.Document.scale !== 1) return; + if (NumCast(this.props.Document.scale, 1) !== 1) return; if (e.altKey && e.button === 0) { e.stopPropagation(); } |
