kopia lustrzana https://github.com/backface/turtlestitch
fix two zebra-coloring related glitches
… which I’ve introduced in trying to avoid “redundant” redraws earlierdev
rodzic
46f80d2773
commit
f5ffcea231
13
blocks.js
13
blocks.js
|
@ -695,11 +695,12 @@ SyntaxElementMorph.prototype.setColor = function (aColor, silently) {
|
|||
if (aColor) {
|
||||
if (!this.color.eq(aColor)) {
|
||||
this.color = aColor;
|
||||
if (silently) {return; }
|
||||
this.drawNew();
|
||||
if (!silently) {this.drawNew(); }
|
||||
this.children.forEach(function (child) {
|
||||
child.drawNew();
|
||||
child.changed();
|
||||
if (!silently || child instanceof TemplateSlotMorph) {
|
||||
child.drawNew();
|
||||
child.changed();
|
||||
}
|
||||
});
|
||||
this.changed();
|
||||
}
|
||||
|
@ -4966,9 +4967,7 @@ RingMorph.prototype.dataType = function () {
|
|||
RingMorph.prototype.fixBlockColor = function (nearest, isForced) {
|
||||
var slot = this.parts()[0];
|
||||
RingMorph.uber.fixBlockColor.call(this, nearest, isForced);
|
||||
if (slot instanceof RingCommandSlotMorph) {
|
||||
slot.fixLayout();
|
||||
}
|
||||
slot.fixLayout();
|
||||
};
|
||||
|
||||
// ScriptsMorph ////////////////////////////////////////////////////////
|
||||
|
|
1
byob.js
1
byob.js
|
@ -1701,6 +1701,7 @@ BlockEditorMorph.prototype.init = function (definition, target) {
|
|||
|
||||
scripts.add(proto);
|
||||
proto.fixBlockColor(null, true);
|
||||
proto.drawNew();
|
||||
|
||||
this.definition.scripts.forEach(function (element) {
|
||||
block = element.fullCopy();
|
||||
|
|
Ładowanie…
Reference in New Issue