]> git.parisson.com Git - pdf.js.git/commitdiff
Reset scale value on opening new file
authorJulian Viereck <julian.viereck@gmail.com>
Wed, 4 Jan 2012 08:24:09 +0000 (09:24 +0100)
committerJulian Viereck <julian.viereck@gmail.com>
Wed, 4 Jan 2012 08:24:09 +0000 (09:24 +0100)
web/viewer.js

index 1c3d9c79cd92633cb2f4676aae72524e676c83a2..f561ed12ec478f6143ce2a263445e0610535e640 100644 (file)
@@ -437,6 +437,10 @@ var PDFView = {
       this.switchSidebarView('outline');
     }
 
+    // Reset the current scale, as otherwise the page's scale might not get
+    // updated if the zoom level stayed the same.
+    this.currentScale = 0;
+    this.currentScaleValue = null;
     if (this.initialBookmark) {
       this.setHash(this.initialBookmark);
       this.initialBookmark = null;