Skip to content
Snippets Groups Projects
Unverified Commit 18451a59 authored by Bryce Taylor's avatar Bryce Taylor Committed by GitHub
Browse files

Use canvas width/height for futureproofing

parent ef2fc7c4
No related branches found
No related tags found
1 merge request!1Synching Fork
......@@ -11,7 +11,7 @@ const jpegThumbnail = dataUrl => new Promise((resolve, reject) => {
// drawImage can fail if image height/width is less than 1
// Use blank image; the costume is too small to render anyway
ctx.fillStyle = 'white'; // Create white background, since jpeg doesn't have transparency
ctx.fillRect(0, 0, maxDimension, maxDimension);
ctx.fillRect(0, 0, canvas.width, canvas.height);
} else {
if (image.height > image.width) {
canvas.height = maxDimension;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment