mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-09 09:45:42 +02:00
Use ES6 features, rather than a temporary variable, when swapping padding values in BaseViewer._setScale
This commit is contained in:
parent
eef70c1eae
commit
0b32dfea86
1 changed files with 1 additions and 3 deletions
|
@ -594,9 +594,7 @@ class BaseViewer {
|
||||||
let vPadding = noPadding ? 0 : VERTICAL_PADDING;
|
let vPadding = noPadding ? 0 : VERTICAL_PADDING;
|
||||||
|
|
||||||
if (!noPadding && this._isScrollModeHorizontal) {
|
if (!noPadding && this._isScrollModeHorizontal) {
|
||||||
const temp = hPadding;
|
[hPadding, vPadding] = [vPadding, hPadding]; // Swap the padding values.
|
||||||
hPadding = vPadding;
|
|
||||||
vPadding = temp;
|
|
||||||
}
|
}
|
||||||
let pageWidthScale = (this.container.clientWidth - hPadding) /
|
let pageWidthScale = (this.container.clientWidth - hPadding) /
|
||||||
currentPage.width * currentPage.scale;
|
currentPage.width * currentPage.scale;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue