diff options
author | yipstanley <stanley_yip@brown.edu> | 2019-06-14 15:47:53 -0400 |
---|---|---|
committer | yipstanley <stanley_yip@brown.edu> | 2019-06-14 15:47:53 -0400 |
commit | 4a5fd3e230fe354dd6c579cad0d5f99a40d230db (patch) | |
tree | 9e4306606ca40d4ff0bb79784ee6d0c892703527 | |
parent | 2ef1dd2089ad991f1d4897022f2d28c2eb130837 (diff) | |
parent | 0b4f3c25471e51d27ddb33dc5ddafafb2c0c03e5 (diff) |
Merge branch 'pdf_impl' of https://github.com/browngraphicslab/Dash-Web into pdf_impl
-rw-r--r-- | src/client/views/nodes/PDFBox.tsx | 3 | ||||
-rw-r--r-- | src/client/views/pdf/PDFViewer.tsx | 3 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/client/views/nodes/PDFBox.tsx b/src/client/views/nodes/PDFBox.tsx index 6ee62bbad..a3c818c91 100644 --- a/src/client/views/nodes/PDFBox.tsx +++ b/src/client/views/nodes/PDFBox.tsx @@ -73,7 +73,8 @@ export class PDFBox extends DocComponent<FieldViewProps, PdfDocument>(PdfDocumen return ( <div onScroll={this.onScroll} style={{ - overflowY: "scroll", overflowX: "hidden", height: `${NumCast(this.props.Document.nativeHeight ? this.props.Document.nativeHeight : 300)}px`, + height: "100%", + overflowY: "scroll", overflowX: "hidden", marginTop: `${NumCast(this.props.ContainingCollectionView!.props.Document.panY)}px` }} onWheel={(e: React.WheelEvent) => e.stopPropagation()} className={classname}> diff --git a/src/client/views/pdf/PDFViewer.tsx b/src/client/views/pdf/PDFViewer.tsx index fbad39880..17f65c7a6 100644 --- a/src/client/views/pdf/PDFViewer.tsx +++ b/src/client/views/pdf/PDFViewer.tsx @@ -111,14 +111,13 @@ class Viewer extends React.Component<IViewerProps> { // if deselected, render images in place of pdf if (wasSelected && !this.props.parent.props.active()) { this.saveThumbnail(); - this._pointerEvents = "all"; } // if selected, render pdf else if (!wasSelected && this.props.parent.props.active()) { this.renderPages(this.startIndex, this.endIndex, true); - this._pointerEvents = "none"; } wasSelected = this.props.parent.props.active(); + this._pointerEvents = wasSelected ? "none" : "all"; }, { fireImmediately: true } ); |