Use ES6 features, rather than a temporary variable, when swapping padding values in BaseViewer._setScale
This commit is contained in:
parent
eef70c1eae
commit
0b32dfea86
@ -594,9 +594,7 @@ class BaseViewer {
|
||||
let vPadding = noPadding ? 0 : VERTICAL_PADDING;
|
||||
|
||||
if (!noPadding && this._isScrollModeHorizontal) {
|
||||
const temp = hPadding;
|
||||
hPadding = vPadding;
|
||||
vPadding = temp;
|
||||
[hPadding, vPadding] = [vPadding, hPadding]; // Swap the padding values.
|
||||
}
|
||||
let pageWidthScale = (this.container.clientWidth - hPadding) /
|
||||
currentPage.width * currentPage.scale;
|
||||
|
Loading…
Reference in New Issue
Block a user