aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/client/views/nodes/PDFBox.tsx3
-rw-r--r--src/client/views/pdf/PDFViewer.tsx3
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 }
);