summaryrefslogtreecommitdiff
path: root/byob.js
diff options
context:
space:
mode:
authorjmoenig <jens@moenig.org>2014-05-02 10:55:03 +0200
committerjmoenig <jens@moenig.org>2014-05-02 10:55:03 +0200
commitf6561867d24f18b5ae803385f1475fce973fd548 (patch)
tree3183584a8f5f1e0ebe99f478c0da1f13cd9a8d1e /byob.js
parent7edecf8255860cd2498bd8e9e72bec5e29992489 (diff)
downloadsnap-byow-f6561867d24f18b5ae803385f1475fce973fd548.tar.gz
snap-byow-f6561867d24f18b5ae803385f1475fce973fd548.zip
fixed #407 (custom-block coloring w/ zebra off)
Diffstat (limited to 'byob.js')
-rw-r--r--byob.js11
1 files changed, 6 insertions, 5 deletions
diff --git a/byob.js b/byob.js
index e47f7c5..6a10110 100644
--- a/byob.js
+++ b/byob.js
@@ -106,7 +106,7 @@ SymbolMorph, isNil*/
// Global stuff ////////////////////////////////////////////////////////
-modules.byob = '2014-April-30';
+modules.byob = '2014-May-02';
// Declarations
@@ -167,9 +167,6 @@ CustomBlockDefinition.prototype.templateInstance = function () {
var block;
block = this.blockInstance();
block.refreshDefaults();
- if (!block.zebraContrast) {
- block.forceNormalColoring(); // label still is wrong
- }
block.isDraggable = false;
block.isTemplate = true;
return block;
@@ -375,8 +372,12 @@ CustomCommandBlockMorph.prototype.refresh = function () {
this.setCategory(def.category);
if (this.blockSpec !== newSpec) {
oldInputs = this.inputs();
+ if (!this.zebraContrast) {
+ this.forceNormalColoring();
+ } else {
+ this.fixBlockColor();
+ }
this.setSpec(newSpec);
- this.fixBlockColor();
this.fixLabelColor();
this.restoreInputs(oldInputs);
} else { // update all input slots' drop-downs