From 556fbdd2a46487bccc11e6de11acf230d09ab8e1 Mon Sep 17 00:00:00 2001 From: jmoenig Date: Fri, 15 Nov 2019 15:34:38 +0100 Subject: [PATCH] catch sub-pixel sized thumbnails --- HISTORY.md | 2 ++ src/objects.js | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/HISTORY.md b/HISTORY.md index c243210f..31802ddb 100755 --- a/HISTORY.md +++ b/HISTORY.md @@ -8,10 +8,12 @@ * disabled direct editing of list watchers for non-literal typed lists (such as costumes) in speech bubbles and prompters * now preserving the sprite's rotation point when taking a video-snap on it * now preventing costumes from becoming "broken" when pasting video snaps on them while the camera is not yet fully initialized + * now catching sub-pixel sized thumbnails * **Translation Updates:** ### 2019-11-15 * objects: prevent costumes from becoming "broken" when pasting video snaps on them while the camera is not yet fully initialized +* objects: catch sub-pixel sized thumbnails ### 2019-11-14 * lists: disabled direct editing of list watchers for non-literal typed lists (such as costumes) in speech bubbles and prompters diff --git a/src/objects.js b/src/objects.js index 12ff524a..3b8e2798 100644 --- a/src/objects.js +++ b/src/objects.js @@ -6954,7 +6954,7 @@ SpriteMorph.prototype.thumbnail = function (extentPoint) { if (this.isCorpse) { ctx.globalAlpha = 0.3; } - if (w && h) { + if (w && h && src.width && src.height) { ctx.scale(scale, scale); ctx.drawImage( src,