]> git.parisson.com Git - pdf.js.git/commitdiff
bug fix
authorArtur Adib <arturadib@gmail.com>
Wed, 30 Nov 2011 21:14:22 +0000 (16:14 -0500)
committerArtur Adib <arturadib@gmail.com>
Wed, 30 Nov 2011 21:14:22 +0000 (16:14 -0500)
web/viewer.js

index b7c654ebfd6919fadc14ab05d5248f50da2a4cee..6b82be6a121ee0038920680c60d661ef63eb193c 100644 (file)
@@ -568,8 +568,8 @@ var ThumbnailView = function thumbnailView(container, page, id, pageRatio) {
     maxThumbSize * pageRatio;
   var canvasHeight = pageRatio <= 1 ? maxThumbSize :
     maxThumbSize / pageRatio;
-  this.scaleX = (canvasWidth / this.width);
-  this.scaleY = (canvasHeight / this.height);
+  var scaleX = this.scaleX = (canvasWidth / this.width);
+  var scaleY = this.scaleY = (canvasHeight / this.height);
 
   var div = document.createElement('div');
   div.id = 'thumbnailContainer' + id;
@@ -598,8 +598,6 @@ var ThumbnailView = function thumbnailView(container, page, id, pageRatio) {
     ctx.restore();
 
     var view = page.view;
-    var scaleX = this.scaleX;
-    var scaleY = this.scaleY;
     ctx.translate(-view.x * scaleX, -view.y * scaleY);
     div.style.width = (view.width * scaleX) + 'px';
     div.style.height = (view.height * scaleY) + 'px';