Prevent setImage from failing to display small thumbnails, by adding a missing canvas to image conversion

*Follow-up to PR 6299.*
This commit is contained in:
Jonas Jenwald 2015-09-11 13:18:35 +02:00
parent ebce928149
commit 555c7925a0

View File

@ -315,6 +315,7 @@ var PDFThumbnailView = (function PDFThumbnailViewClosure() {
if (img.width <= 2 * canvas.width) {
ctx.drawImage(img, 0, 0, img.width, img.height,
0, 0, canvas.width, canvas.height);
this._convertCanvasToImage();
return;
}
// drawImage does an awful job of rescaling the image, doing it gradually.