diff options
author | kimdahey <claire_kim1@brown.edu> | 2019-07-17 10:55:31 -0400 |
---|---|---|
committer | kimdahey <claire_kim1@brown.edu> | 2019-07-17 10:55:31 -0400 |
commit | ee385cd02a6ce99d59eb02a768bb587b566328e9 (patch) | |
tree | d3308280d3975a3fd090b0e548b268fb2ad20304 /src/client/views/pdf/PDFViewer.tsx | |
parent | e3527a5f0334156a70b36980b8188ceb15ea5de3 (diff) |
jumping to a region from a link now shows the whole region supposedly
Diffstat (limited to 'src/client/views/pdf/PDFViewer.tsx')
-rw-r--r-- | src/client/views/pdf/PDFViewer.tsx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/client/views/pdf/PDFViewer.tsx b/src/client/views/pdf/PDFViewer.tsx index c560e581c..1e10cb022 100644 --- a/src/client/views/pdf/PDFViewer.tsx +++ b/src/client/views/pdf/PDFViewer.tsx @@ -192,7 +192,9 @@ export class Viewer extends React.Component<IViewerProps> { } scrollTo(y: number) { - this.props.parent.scrollTo(y); + if (this.props.mainCont.current) { + this.props.parent.scrollTo(y - this.props.mainCont.current.clientHeight); + } } @action |