aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/PDFBox.tsx
diff options
context:
space:
mode:
authorTyler Schicke <tyler_schicke@brown.edu>2019-07-29 14:08:59 -0400
committerTyler Schicke <tyler_schicke@brown.edu>2019-07-29 14:08:59 -0400
commit5d68a57121ac35339d5e223f5dc40ebfd414fd0f (patch)
tree599522f02fd8a1ee7ced3f12253c808b18469abe /src/client/views/nodes/PDFBox.tsx
parentbb607ecb02a7ecb8fe782d60e10ebf5bdedd790b (diff)
parenta09d610e2a5c09e473b15be23c32f0c3cc370a17 (diff)
Merge branch 'master' of github-tsch-brown:browngraphicslab/Dash-Web
Diffstat (limited to 'src/client/views/nodes/PDFBox.tsx')
-rw-r--r--src/client/views/nodes/PDFBox.tsx2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/client/views/nodes/PDFBox.tsx b/src/client/views/nodes/PDFBox.tsx
index f527c0595..4973340df 100644
--- a/src/client/views/nodes/PDFBox.tsx
+++ b/src/client/views/nodes/PDFBox.tsx
@@ -167,7 +167,7 @@ export class PDFBox extends DocComponent<FieldViewProps, PdfDocument>(PdfDocumen
scrollTo(y: number) {
if (this._mainCont.current) {
- this._mainCont.current.scrollTo({ top: y, behavior: "auto" });
+ this._mainCont.current.scrollTo({ top: Math.max(y - (this._mainCont.current!.offsetHeight / 2), 0), behavior: "auto" });
}
}