diff options
author | yipstanley <stanley_yip@brown.edu> | 2019-07-28 20:31:11 -0400 |
---|---|---|
committer | yipstanley <stanley_yip@brown.edu> | 2019-07-28 20:31:11 -0400 |
commit | 99ab639f4de270eb1f7b497b6386cb8d5a1f7e5f (patch) | |
tree | 54480c2e66cf05911d640209c9e162e1303f1dcd /src/client/views/nodes/PDFBox.tsx | |
parent | e70f996dc25d466a2e94535b14997146d60977ec (diff) |
fixed next and prev annotation scorlling
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" }); } } |