Skip to content

Commit

Permalink
Simplify the _setScale call when changing Scroll modes
Browse files Browse the repository at this point in the history
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 mode is pointless.
  • Loading branch information
Snuffleupagus committed Jun 23, 2018
1 parent d3cb5e7 commit 044c8ea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion web/pdf_viewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 044c8ea

Please sign in to comment.