From 555c7925a0da9606f70c8f97c23d041d686e53ae Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Fri, 11 Sep 2015 13:18:35 +0200 Subject: [PATCH] Prevent `setImage` from failing to display small thumbnails, by adding a missing `canvas` to `image` conversion *Follow-up to PR 6299.* --- web/pdf_thumbnail_view.js | 1 + 1 file changed, 1 insertion(+) diff --git a/web/pdf_thumbnail_view.js b/web/pdf_thumbnail_view.js index 71488c114..71f52aee6 100644 --- a/web/pdf_thumbnail_view.js +++ b/web/pdf_thumbnail_view.js @@ -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.