]> git.parisson.com Git - pdf.js.git/commitdiff
Ignore new scale value if it's the same as before
authorJulian Viereck <julian.viereck@gmail.com>
Thu, 22 Dec 2011 18:02:52 +0000 (19:02 +0100)
committerJulian Viereck <julian.viereck@gmail.com>
Mon, 2 Jan 2012 19:02:20 +0000 (20:02 +0100)
web/viewer.js

index 12158c4b87215232b199ac0a412911ca5f32cde5..441a36a929a7d620f275430cd0e325fc24b0db33 100644 (file)
@@ -149,6 +149,9 @@ var PDFView = {
   initialBookmark: document.location.hash.substring(1),
 
   setScale: function pdfViewSetScale(val, resetAutoSettings) {
+    if (val == this.currentScale)
+      return;
+
     var pages = this.pages;
     for (var i = 0; i < pages.length; i++)
       pages[i].update(val * kCssUnits);