kopia lustrzana https://github.com/backface/turtlestitch
fixed #407 (custom-block coloring w/ zebra off)
rodzic
7edecf8255
commit
f6561867d2
11
byob.js
11
byob.js
|
@ -106,7 +106,7 @@ SymbolMorph, isNil*/
|
||||||
|
|
||||||
// Global stuff ////////////////////////////////////////////////////////
|
// Global stuff ////////////////////////////////////////////////////////
|
||||||
|
|
||||||
modules.byob = '2014-April-30';
|
modules.byob = '2014-May-02';
|
||||||
|
|
||||||
// Declarations
|
// Declarations
|
||||||
|
|
||||||
|
@ -167,9 +167,6 @@ CustomBlockDefinition.prototype.templateInstance = function () {
|
||||||
var block;
|
var block;
|
||||||
block = this.blockInstance();
|
block = this.blockInstance();
|
||||||
block.refreshDefaults();
|
block.refreshDefaults();
|
||||||
if (!block.zebraContrast) {
|
|
||||||
block.forceNormalColoring(); // label still is wrong
|
|
||||||
}
|
|
||||||
block.isDraggable = false;
|
block.isDraggable = false;
|
||||||
block.isTemplate = true;
|
block.isTemplate = true;
|
||||||
return block;
|
return block;
|
||||||
|
@ -375,8 +372,12 @@ CustomCommandBlockMorph.prototype.refresh = function () {
|
||||||
this.setCategory(def.category);
|
this.setCategory(def.category);
|
||||||
if (this.blockSpec !== newSpec) {
|
if (this.blockSpec !== newSpec) {
|
||||||
oldInputs = this.inputs();
|
oldInputs = this.inputs();
|
||||||
|
if (!this.zebraContrast) {
|
||||||
|
this.forceNormalColoring();
|
||||||
|
} else {
|
||||||
|
this.fixBlockColor();
|
||||||
|
}
|
||||||
this.setSpec(newSpec);
|
this.setSpec(newSpec);
|
||||||
this.fixBlockColor();
|
|
||||||
this.fixLabelColor();
|
this.fixLabelColor();
|
||||||
this.restoreInputs(oldInputs);
|
this.restoreInputs(oldInputs);
|
||||||
} else { // update all input slots' drop-downs
|
} else { // update all input slots' drop-downs
|
||||||
|
|
|
@ -2124,3 +2124,4 @@ ______
|
||||||
140502
|
140502
|
||||||
------
|
------
|
||||||
* error message when trying to import a non-text file into a variable, thanks, Nate!
|
* error message when trying to import a non-text file into a variable, thanks, Nate!
|
||||||
|
* fixed #407 (custom-block coloring w/ zebra off)
|
||||||
|
|
Ładowanie…
Reference in New Issue