[Pkg-javascript-commits] [pdf.js] 29/106: Fix scroll to zoom jump between 25% and 1000%

David Prévot taffit at moszumanska.debian.org
Sat Jun 20 21:33: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 ed540a8d00e348f740dcfe6614c07b71573a800a
Author: Xiliang Chen <xlchen1291 at gmail.com>
Date:   Thu May 14 15:27:56 2015 +1200

    Fix scroll to zoom jump between 25% and 1000%
---
 web/viewer.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/web/viewer.js b/web/viewer.js
index 6a6389f..18c32ff 100644
--- a/web/viewer.js
+++ b/web/viewer.js
@@ -291,7 +291,7 @@ var PDFViewerApplication = {
       newScale = (newScale * DEFAULT_SCALE_DELTA).toFixed(2);
       newScale = Math.ceil(newScale * 10) / 10;
       newScale = Math.min(MAX_SCALE, newScale);
-    } while (--ticks && newScale < MAX_SCALE);
+    } while (--ticks > 0 && newScale < MAX_SCALE);
     this.setScale(newScale, true);
   },
 
@@ -301,7 +301,7 @@ var PDFViewerApplication = {
       newScale = (newScale / DEFAULT_SCALE_DELTA).toFixed(2);
       newScale = Math.floor(newScale * 10) / 10;
       newScale = Math.max(MIN_SCALE, newScale);
-    } while (--ticks && newScale > MIN_SCALE);
+    } while (--ticks > 0 && newScale > MIN_SCALE);
     this.setScale(newScale, true);
   },
 

-- 
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