summaryrefslogtreecommitdiff
path: root/objects.js
diff options
context:
space:
mode:
Diffstat (limited to 'objects.js')
-rw-r--r--objects.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/objects.js b/objects.js
index 37daa69..a6d2c9a 100644
--- a/objects.js
+++ b/objects.js
@@ -5058,6 +5058,12 @@ SpriteBubbleMorph.prototype.dataAsMorph = function (data) {
contents.silentSetWidth(img.width);
contents.silentSetHeight(img.height);
contents.image = img;
+ } else if (data instanceof Costume) {
+ img = data.thumbnail(new Point(40, 40));
+ contents = new Morph();
+ contents.silentSetWidth(img.width);
+ contents.silentSetHeight(img.height);
+ contents.image = img;
} else if (data instanceof HTMLCanvasElement) {
contents = new Morph();
contents.silentSetWidth(data.width);
@@ -5900,6 +5906,12 @@ CellMorph.prototype.drawNew = function () {
this.contentsMorph.silentSetWidth(img.width);
this.contentsMorph.silentSetHeight(img.height);
this.contentsMorph.image = img;
+ } else if (this.contents instanceof Costume) {
+ img = this.contents.thumbnail(new Point(40, 40));
+ this.contentsMorph = new Morph();
+ this.contentsMorph.silentSetWidth(img.width);
+ this.contentsMorph.silentSetHeight(img.height);
+ this.contentsMorph.image = img;
} else if (this.contents instanceof List) {
if (this.isCircular()) {
this.contentsMorph = new TextMorph(