summaryrefslogtreecommitdiff
path: root/blocks.js
diff options
context:
space:
mode:
authorjmoenig <jens@moenig.org>2013-06-21 09:06:46 +0200
committerjmoenig <jens@moenig.org>2013-06-21 09:06:46 +0200
commit25ea3d4a16696989824df9994f4024ba5aebc7ca (patch)
treef8ab294e141e7cf3d422825c7142993c765554ac /blocks.js
parentbed3e03e65efdf1713036733ecbb011fae263b90 (diff)
downloadsnap-byow-25ea3d4a16696989824df9994f4024ba5aebc7ca.tar.gz
snap-byow-25ea3d4a16696989824df9994f4024ba5aebc7ca.zip
Morphic, Blocks: "flat" design fix
Handle manually "unshadowed" StringMorphs without throwing an exception. This lets you load the tools library into "flat" mode again.
Diffstat (limited to 'blocks.js')
-rw-r--r--blocks.js9
1 files changed, 4 insertions, 5 deletions
diff --git a/blocks.js b/blocks.js
index 0e667aa..34317bb 100644
--- a/blocks.js
+++ b/blocks.js
@@ -155,7 +155,7 @@ DialogBoxMorph, BlockInputFragmentMorph, PrototypeHatBlockMorph*/
// Global stuff ////////////////////////////////////////////////////////
-modules.blocks = '2013-June-20';
+modules.blocks = '2013-June-21';
var SyntaxElementMorph;
var BlockMorph;
@@ -1168,9 +1168,8 @@ SyntaxElementMorph.prototype.labelPart = function (spec) {
part.color = new Color(255, 255, 255);
part.isBold = true;
part.shadowColor = this.color.darker(this.labelContrast);
- if (!MorphicPreferences.isFlat) {
- part.shadowOffset = this.embossing;
- }
+ part.shadowOffset = MorphicPreferences.isFlat ?
+ new Point() : this.embossing;
part.drawNew();
}
return part;
@@ -8616,7 +8615,7 @@ ArgLabelMorph.prototype.fixLayout = function () {
if (this.parent) {
this.color = this.parent.color;
- shadowOffset = label.shadowOffset;
+ shadowOffset = label.shadowOffset || new Point();
// determine the shadow color for zebra coloring:
if (shadowOffset.x < 0) {