Simplify the _setScale
call when changing Scroll modes
Since the current page will be explicitly scrolled into view *directly* afterwards anyway (compare with e.g. the `pagesRotation` code), trying to maintain the current position when re-applying the zoom level during changing of Scroll modes is redundant.
This commit is contained in:
parent
d3cb5e7117
commit
bfbe2b411c
@ -111,7 +111,7 @@ class PDFViewer extends BaseViewer {
|
|||||||
// Call this before re-scrolling to the current page, to ensure that any
|
// Call this before re-scrolling to the current page, to ensure that any
|
||||||
// changes in scale don't move the current page.
|
// changes in scale don't move the current page.
|
||||||
if (isNaN(this._currentScaleValue)) {
|
if (isNaN(this._currentScaleValue)) {
|
||||||
this._setScale(this._currentScaleValue, this.isInPresentationMode);
|
this._setScale(this._currentScaleValue, true);
|
||||||
}
|
}
|
||||||
this.scrollPageIntoView({ pageNumber, });
|
this.scrollPageIntoView({ pageNumber, });
|
||||||
this.update();
|
this.update();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user