summaryrefslogtreecommitdiff
path: root/objects.js
diff options
context:
space:
mode:
authorjmoenig <jens@moenig.org>2013-12-12 15:27:49 +0100
committerjmoenig <jens@moenig.org>2013-12-12 15:27:49 +0100
commitf48460fc2544fe6af4f20f79aa8e56d92a3423b6 (patch)
tree12b43da3efc033f131efa72cb719278951396b7b /objects.js
parent59a39077b80d35fdb47ea67b4d87f1ab9a67807f (diff)
downloadsnap-yow-f48460fc2544fe6af4f20f79aa8e56d92a3423b6.tar.gz
snap-yow-f48460fc2544fe6af4f20f79aa8e56d92a3423b6.zip
null-canvas blitting bug follow-up
Diffstat (limited to 'objects.js')
-rw-r--r--objects.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/objects.js b/objects.js
index e6cb533..d5afc83 100644
--- a/objects.js
+++ b/objects.js
@@ -3373,7 +3373,7 @@ SpriteMorph.prototype.thumbnail = function (extentPoint) {
ctx = trg.getContext('2d');
ctx.save();
- if (scale !== Infinity) {
+ if (src.width && src.height) {
ctx.scale(scale, scale);
ctx.drawImage(
src,
@@ -4646,7 +4646,8 @@ StageMorph.prototype.thumbnail = function (extentPoint, excludedSprite) {
),
trg = newCanvas(extentPoint),
ctx = trg.getContext('2d'),
- fb;
+ fb,
+ fimg;
ctx.scale(scale, scale);
ctx.drawImage(
@@ -4664,7 +4665,8 @@ StageMorph.prototype.thumbnail = function (extentPoint, excludedSprite) {
this.children.forEach(function (morph) {
if (morph !== excludedSprite) {
fb = morph.fullBounds();
- if (fb.extent().gt(new Point())) {
+ fimg = morph.fullImage();
+ if (fimg.width && fimg.height) {
ctx.drawImage(
morph.fullImage(),
fb.origin.x - myself.bounds.origin.x,