]> git.parisson.com Git - pdf.js.git/commitdiff
Fixes page-width mode
authorYury Delendik <ydelendik@mozilla.com>
Tue, 17 Apr 2012 20:53:17 +0000 (15:53 -0500)
committerYury Delendik <ydelendik@mozilla.com>
Tue, 17 Apr 2012 20:53:17 +0000 (15:53 -0500)
web/viewer.js

index 3233371cc25d85435777df0ad4eeb8155c0dd0b7..97178f0e9e7849d4e8f079bb5b7b2414acad87dc 100644 (file)
@@ -247,9 +247,9 @@ var PDFView = {
 
     var currentPage = this.pages[this.page - 1];
     var pageWidthScale = (window.innerWidth - kScrollbarPadding) /
-                          currentPage.width / kCssUnits;
+                          currentPage.width * currentPage.scale / kCssUnits;
     var pageHeightScale = (window.innerHeight - kScrollbarPadding) /
-                           currentPage.height / kCssUnits;
+                           currentPage.height * currentPage.scale / kCssUnits;
     if ('page-width' == value)
       this.setScale(pageWidthScale, resetAutoSettings);
     if ('page-height' == value)