diff options
author | Tyler Schicke <tyler_schicke@brown.edu> | 2019-05-11 22:55:44 -0400 |
---|---|---|
committer | Tyler Schicke <tyler_schicke@brown.edu> | 2019-05-11 22:55:44 -0400 |
commit | 0103346e8bae5113f5ea6f34d2745addac3a192e (patch) | |
tree | d28a39521298a76682688bf688447e7a1b5604b6 /src/client/views/nodes/PDFBox.tsx | |
parent | 7da76d2538ebde21d7a878b5096d5a673e5d6375 (diff) |
Changed measure params that we use
Diffstat (limited to 'src/client/views/nodes/PDFBox.tsx')
-rw-r--r-- | src/client/views/nodes/PDFBox.tsx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/views/nodes/PDFBox.tsx b/src/client/views/nodes/PDFBox.tsx index caa66cbeb..f2fa6f47c 100644 --- a/src/client/views/nodes/PDFBox.tsx +++ b/src/client/views/nodes/PDFBox.tsx @@ -279,7 +279,7 @@ export class PDFBox extends DocComponent<FieldViewProps, PdfDocument>(PdfDocumen // so this design is flawed. var nativeWidth = FieldValue(this.Document.nativeWidth, 0); if (!FieldValue(this.Document.nativeHeight, 0)) { - var nativeHeight = nativeWidth * r.entry.height / r.entry.width; + var nativeHeight = nativeWidth * r.offset.height / r.offset.width; this.props.Document.height = nativeHeight / nativeWidth * FieldValue(this.Document.width, 0); this.props.Document.nativeHeight = nativeHeight; } @@ -297,7 +297,7 @@ export class PDFBox extends DocComponent<FieldViewProps, PdfDocument>(PdfDocumen let xf = FieldValue(this.Document.nativeHeight, 0) / renderHeight; let body = NumCast(this.props.Document.nativeHeight) ? this.pdfPage : - <Measure onResize={this.setScaling}> + <Measure offset onResize={this.setScaling}> {({ measureRef }) => <div className="pdfBox-page" ref={measureRef}> {this.pdfPage} |