[Pkg-javascript-commits] [pdf.js] 117/157: Use `DEFAULT_SCALE_VALUE` as default when fetching the `zoom` parameter from `PDFViewerApplication.store` (i.e. `ViewHistory`)

David Prévot taffit at moszumanska.debian.org
Tue Aug 11 06:46:46 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository pdf.js.

commit fa53cd6ca3f0b04d1074eac0cea30800fd7ba903
Author: Jonas Jenwald <jonas.jenwald at gmail.com>
Date:   Wed Jul 22 23:58:30 2015 +0200

    Use `DEFAULT_SCALE_VALUE` as default when fetching the `zoom` parameter from `PDFViewerApplication.store` (i.e. `ViewHistory`)
    
    Since the zoom value should be in percent, using `PDFViewer.currentScale` will be wrong by a factor of 100, potentially causing the zoom level of the document to become wrong on load.
---
 web/viewer.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/web/viewer.js b/web/viewer.js
index 602750c..5ef1218 100644
--- a/web/viewer.js
+++ b/web/viewer.js
@@ -790,7 +790,7 @@ var PDFViewerApplication = {
             store.get('exists', false)) {
           var pageNum = store.get('page', '1');
           var zoom = self.preferenceDefaultZoomValue ||
-                     store.get('zoom', self.pdfViewer.currentScale);
+                     store.get('zoom', DEFAULT_SCALE_VALUE);
           var left = store.get('scrollLeft', '0');
           var top = store.get('scrollTop', '0');
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/pdf.js.git



More information about the Pkg-javascript-commits mailing list