From c081eb997f8dd23bfdf7a9c503102c0f2ace4fb1 Mon Sep 17 00:00:00 2001 From: jmoenig Date: Thu, 7 Feb 2019 07:42:47 +0100 Subject: [PATCH] tweaked loading mechanism to enable command blocks inside reporter rings --- HISTORY.md | 3 +++ snap.html | 2 +- src/store.js | 15 +++++++++++---- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index 37288bbf..7330fbf9 100755 --- a/HISTORY.md +++ b/HISTORY.md @@ -38,6 +38,9 @@ * Greek, thanks, Alexandros! * German +### 2019-02-07 +* Store: tweaked loading mechanism to enable command blocks inside reporter rings + ### 2019-02-06 * Blocks, BYOB: refactored custom block input options and drop-down menus * Blocks: adjust bottom of STOP block to reflect the menu selection (show / hide bottom notch) diff --git a/snap.html b/snap.html index 8916384b..b9661f57 100755 --- a/snap.html +++ b/snap.html @@ -17,7 +17,7 @@ - + diff --git a/src/store.js b/src/store.js index cc0b4412..077713f2 100644 --- a/src/store.js +++ b/src/store.js @@ -61,7 +61,7 @@ normalizeCanvas, contains*/ // Global stuff //////////////////////////////////////////////////////// -modules.store = '2019-January-23'; +modules.store = '2019-February-07'; // XML_Serializer /////////////////////////////////////////////////////// @@ -1143,7 +1143,9 @@ SnapSerializer.prototype.loadBlock = function (model, isReporter, object) { } */ block = SpriteMorph.prototype.blockForSelector(model.attributes.s); - migration = SpriteMorph.prototype.blockMigrations[model.attributes.s]; + migration = SpriteMorph.prototype.blockMigrations[ + model.attributes.s + ]; if (migration) { migrationOffset = migration.offset; } @@ -1231,8 +1233,13 @@ SnapSerializer.prototype.loadInput = function (model, input, block, object) { if (model.tag === 'script') { inp = this.loadScript(model, object); if (inp) { - input.add(inp); - input.fixLayout(); + if (block.selector === 'reifyReporter') { + input.silentReplaceInput(input.children[0], inp); + input.fixLayout(); + } else { + input.add(inp); + input.fixLayout(); + } } } else if (model.tag === 'autolambda' && model.children[0]) { inp = this.loadBlock(model.children[0], true, object);