diff options
author | Tyler Schicke <tyler_schicke@brown.edu> | 2019-07-29 14:08:59 -0400 |
---|---|---|
committer | Tyler Schicke <tyler_schicke@brown.edu> | 2019-07-29 14:08:59 -0400 |
commit | 5d68a57121ac35339d5e223f5dc40ebfd414fd0f (patch) | |
tree | 599522f02fd8a1ee7ced3f12253c808b18469abe /src/client/views/nodes/PDFBox.tsx | |
parent | bb607ecb02a7ecb8fe782d60e10ebf5bdedd790b (diff) | |
parent | a09d610e2a5c09e473b15be23c32f0c3cc370a17 (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.tsx | 2 |
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" }); } } |