mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-19 14:48:08 +02:00
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
1 changed files with 1 additions and 1 deletions
|
@ -111,7 +111,7 @@ class PDFViewer extends BaseViewer {
|
|||
// Call this before re-scrolling to the current page, to ensure that any
|
||||
// changes in scale don't move the current page.
|
||||
if (isNaN(this._currentScaleValue)) {
|
||||
this._setScale(this._currentScaleValue, this.isInPresentationMode);
|
||||
this._setScale(this._currentScaleValue, true);
|
||||
}
|
||||
this.scrollPageIntoView({ pageNumber, });
|
||||
this.update();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue