From: Artur Adib Date: Wed, 30 Nov 2011 21:14:22 +0000 (-0500) Subject: bug fix X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=8dc467709d834fcf1674c47eb9a84835feb76d51;p=pdf.js.git bug fix --- diff --git a/web/viewer.js b/web/viewer.js index b7c654e..6b82be6 100644 --- a/web/viewer.js +++ b/web/viewer.js @@ -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';