Merge pull request #15798 from Snuffleupagus/PresentationMode-spreadMode-hPadding
Fix page-switching for landscape documents with SpreadModes and PresentationMode (PR 14877 follow-up)
This commit is contained in:
commit
3155e2a63b
@ -1163,7 +1163,14 @@ class PDFViewer {
|
||||
vPadding = VERTICAL_PADDING;
|
||||
|
||||
if (this.isInPresentationMode) {
|
||||
hPadding = vPadding = 4;
|
||||
// Pages have a 2px (transparent) border in PresentationMode, see
|
||||
// the `web/pdf_viewer.css` file.
|
||||
hPadding = vPadding = 4; // 2 * 2px
|
||||
if (this._spreadMode !== SpreadMode.NONE) {
|
||||
// Account for two pages being visible in PresentationMode, thus
|
||||
// "doubling" the total border width.
|
||||
hPadding *= 2;
|
||||
}
|
||||
} else if (this.removePageBorders) {
|
||||
hPadding = vPadding = 0;
|
||||
} else if (this._scrollMode === ScrollMode.HORIZONTAL) {
|
||||
|
Loading…
Reference in New Issue
Block a user