From 8602d5798a4a95f482aad570f7d5965595a9c2a8 Mon Sep 17 00:00:00 2001 From: Christopher Willis-Ford Date: Fri, 7 Sep 2018 12:16:48 -0700 Subject: [PATCH] Allow extension reporter only if no block args --- src/engine/runtime.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/engine/runtime.js b/src/engine/runtime.js index aae3c3a16..32ca69567 100644 --- a/src/engine/runtime.js +++ b/src/engine/runtime.js @@ -745,9 +745,6 @@ class Runtime extends EventEmitter { case BlockType.REPORTER: blockJSON.output = 'String'; // TODO: distinguish number & string here? blockJSON.outputShape = ScratchBlocksConstants.OUTPUT_SHAPE_ROUND; - if (!blockInfo.disableMonitor) { - blockJSON.checkboxInFlyout = true; - } break; case BlockType.BOOLEAN: blockJSON.output = 'Boolean'; @@ -805,8 +802,12 @@ class Runtime extends EventEmitter { } } - // Add icon to the bottom right of a loop block - if (blockInfo.blockType === BlockType.LOOP) { + if (blockInfo.blockType === BlockType.REPORTER) { + if (!blockInfo.disableMonitor && context.inputList.length === 0) { + blockJSON.checkboxInFlyout = true; + } + } else if (blockInfo.blockType === BlockType.LOOP) { + // Add icon to the bottom right of a loop block blockJSON[`lastDummyAlign${outLineNum}`] = 'RIGHT'; blockJSON[`message${outLineNum}`] = '%1'; blockJSON[`args${outLineNum}`] = [{