From bfbe2b411c3aa0925fa6b0c35a1eee3614c9ddf6 Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Sat, 23 Jun 2018 10:43:07 +0200 Subject: [PATCH] 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. --- web/pdf_viewer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/pdf_viewer.js b/web/pdf_viewer.js index 6e42db779..0a7db67ce 100644 --- a/web/pdf_viewer.js +++ b/web/pdf_viewer.js @@ -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();