bug fix
This commit is contained in:
parent
5aad7cb7b5
commit
8dc467709d
@ -568,8 +568,8 @@ var ThumbnailView = function thumbnailView(container, page, id, pageRatio) {
|
|||||||
maxThumbSize * pageRatio;
|
maxThumbSize * pageRatio;
|
||||||
var canvasHeight = pageRatio <= 1 ? maxThumbSize :
|
var canvasHeight = pageRatio <= 1 ? maxThumbSize :
|
||||||
maxThumbSize / pageRatio;
|
maxThumbSize / pageRatio;
|
||||||
this.scaleX = (canvasWidth / this.width);
|
var scaleX = this.scaleX = (canvasWidth / this.width);
|
||||||
this.scaleY = (canvasHeight / this.height);
|
var scaleY = this.scaleY = (canvasHeight / this.height);
|
||||||
|
|
||||||
var div = document.createElement('div');
|
var div = document.createElement('div');
|
||||||
div.id = 'thumbnailContainer' + id;
|
div.id = 'thumbnailContainer' + id;
|
||||||
@ -598,8 +598,6 @@ var ThumbnailView = function thumbnailView(container, page, id, pageRatio) {
|
|||||||
ctx.restore();
|
ctx.restore();
|
||||||
|
|
||||||
var view = page.view;
|
var view = page.view;
|
||||||
var scaleX = this.scaleX;
|
|
||||||
var scaleY = this.scaleY;
|
|
||||||
ctx.translate(-view.x * scaleX, -view.y * scaleY);
|
ctx.translate(-view.x * scaleX, -view.y * scaleY);
|
||||||
div.style.width = (view.width * scaleX) + 'px';
|
div.style.width = (view.width * scaleX) + 'px';
|
||||||
div.style.height = (view.height * scaleY) + 'px';
|
div.style.height = (view.height * scaleY) + 'px';
|
||||||
|
Loading…
Reference in New Issue
Block a user