aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/PDFBox.tsx
diff options
context:
space:
mode:
authorbob <bcz@cs.brown.edu>2019-03-08 13:03:57 -0500
committerbob <bcz@cs.brown.edu>2019-03-08 13:03:57 -0500
commitd3e66a67406447682c59045a0130d884fe1045a6 (patch)
tree67602d8d53ff280f431e8eb28d3d10e83c3f6283 /src/client/views/nodes/PDFBox.tsx
parentc4eff83d814b1f9b94b7fc75ca06e8f0474de20d (diff)
bug fixes and hack to make context menu appear again
Diffstat (limited to 'src/client/views/nodes/PDFBox.tsx')
-rw-r--r--src/client/views/nodes/PDFBox.tsx4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/client/views/nodes/PDFBox.tsx b/src/client/views/nodes/PDFBox.tsx
index fb3e24659..70a70c7c8 100644
--- a/src/client/views/nodes/PDFBox.tsx
+++ b/src/client/views/nodes/PDFBox.tsx
@@ -432,7 +432,9 @@ export class PDFBox extends React.Component<FieldViewProps> {
@computed
get pdfContent() {
- const page = this.curPage;
+ let page = this.curPage;
+ if (page == 0)
+ page = 1;
const renderHeight = 2400;
let pdfUrl = this.props.doc.GetT(this.props.fieldKey, PDFField);
let xf = this.props.doc.GetNumber(KeyStore.NativeHeight, 0) / renderHeight;