summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjmoenig <jens@moenig.org>2014-09-30 10:31:13 +0200
committerjmoenig <jens@moenig.org>2014-09-30 10:31:13 +0200
commit71c9103503691285191e024c8ae30200240d54cc (patch)
tree4c5b17145ffa020abea041189b29e38a01b054b9
parente88ea49374d33e19eafbf3d295fa098ec86d7f1f (diff)
downloadsnap-yow-71c9103503691285191e024c8ae30200240d54cc.tar.gz
snap-yow-71c9103503691285191e024c8ae30200240d54cc.zip
fixed #378
disable context menus for boolean representations
-rwxr-xr-xhistory.txt1
-rw-r--r--objects.js8
2 files changed, 7 insertions, 2 deletions
diff --git a/history.txt b/history.txt
index 1e1ccee..2b0f73f 100755
--- a/history.txt
+++ b/history.txt
@@ -2288,4 +2288,5 @@ ______
* Objects: fixed #593 match broadcast numbers with event hat blocks containing strings that can be parsed as numbers
* BYOB: allow percent symbols in custom block texts (fix #361), thanks, @Gubolin!!
* Morphic: allow negative min/max values for sliders (fix #285), thanks, @Gubolin!!
+* Objects: fixed #378 (disable context menus for boolean representations)
diff --git a/objects.js b/objects.js
index a36cfae..cca5439 100644
--- a/objects.js
+++ b/objects.js
@@ -6408,10 +6408,14 @@ CellMorph.prototype.drawNew = function () {
}
this.contentsMorph.setColor(new Color(255, 255, 255));
} else if (typeof this.contents === 'boolean') {
- this.contentsMorph = SpriteMorph.prototype.booleanMorph.call(
+ img = SpriteMorph.prototype.booleanMorph.call(
null,
this.contents
- );
+ ).fullImage();
+ this.contentsMorph = new Morph();
+ this.contentsMorph.silentSetWidth(img.width);
+ this.contentsMorph.silentSetHeight(img.height);
+ this.contentsMorph.image = img;
} else if (this.contents instanceof HTMLCanvasElement) {
this.contentsMorph = new Morph();
this.contentsMorph.silentSetWidth(this.contents.width);