[web] Account for page border when restoring scroll position in PDF preview (#5955)

GitOrigin-RevId: a5c74151e085db2e413ff27b46c67bff8c28487f
This commit is contained in:
Alf Eaton 2021-12-02 11:59:41 +00:00 committed by Copybot
parent 43551d3449
commit d7efa156f9

View file

@ -175,6 +175,11 @@ export default class PDFJSWrapper {
pageNumber: position.page + 1,
destArray,
})
// scroll the page down by an extra few pixels to account for the pdf.js viewer page border
this.viewer.container.scrollBy({
top: -9,
})
}
abortDocumentLoading() {