From 8dc467709d834fcf1674c47eb9a84835feb76d51 Mon Sep 17 00:00:00 2001 From: Artur Adib Date: Wed, 30 Nov 2011 16:14:22 -0500 Subject: [PATCH] bug fix --- web/viewer.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/web/viewer.js b/web/viewer.js index b7c654ebf..6b82be6a1 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';