syntactical tweaks to block-assembly support

snap7
jmoenig 2021-12-02 12:48:25 +01:00
rodzic b5933d8050
commit 0e04a9ca9a
1 zmienionych plików z 10 dodań i 2 usunięć

Wyświetl plik

@ -3733,7 +3733,8 @@ BlockMorph.prototype.copyWithInputs = function (inputs) {
if (inp instanceof BlockMorph) {
if (inp instanceof CommandBlockMorph && slots[i].nestedBlock) {
slots[i].nestedBlock(inp);
} else {
} else if (inp instanceof ReporterBlockMorph &&
!slots[i].isStatic) {
cpy.replaceInput(slots[i], inp);
}
} else {
@ -5521,8 +5522,11 @@ CommandBlockMorph.prototype.copyWithNext = function (next) {
var exp = this.fullCopy(),
bottom = exp.bottomBlock(),
top = next.fullCopy().topBlock();
if (top instanceof CommandBlockMorph) {
bottom.nextBlock(top);
return exp.reify();
}
return exp.reify();
};
// CommandBlockMorph drawing:
@ -6313,6 +6317,10 @@ ReporterBlockMorph.prototype.components = function () {
return parts;
};
ReporterBlockMorph.prototype.copyWithNext = function (next) {
return this.fullCopy().reify();
};
// ReporterBlockMorph drawing:
ReporterBlockMorph.prototype.outlinePath = function (ctx, inset) {