fix two zebra-coloring related glitches

… which I’ve introduced in trying to avoid “redundant” redraws earlier
dev
Jens Mönig 2015-11-16 18:02:35 +01:00
rodzic 46f80d2773
commit f5ffcea231
2 zmienionych plików z 7 dodań i 7 usunięć

Wyświetl plik

@ -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 ////////////////////////////////////////////////////////

Wyświetl plik

@ -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();