summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--morphic.js2
-rw-r--r--objects.js8
2 files changed, 6 insertions, 4 deletions
diff --git a/morphic.js b/morphic.js
index f6e55e3..b3c9769 100644
--- a/morphic.js
+++ b/morphic.js
@@ -2735,7 +2735,7 @@ Morph.prototype.fullImage = function () {
this.allChildren().forEach(function (morph) {
if (morph.isVisible) {
ctx.globalAlpha = morph.alpha;
- if (morph.extent().gt(new Point())) {
+ if (morph.image.width && morph.image.height) {
ctx.drawImage(
morph.image,
morph.bounds.origin.x - fb.origin.x,
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,