Enable extension monitors, add flag to disable

Extension reporters now offer a monitor checkbox by default, unless the
`disableMonitor` flag is set in the extension block metadata.
This commit is contained in:
Christopher Willis-Ford 2018-09-07 11:13:13 -07:00
parent b41423bdfa
commit 701fb6c1c5
2 changed files with 4 additions and 0 deletions
src/engine

View file

@ -745,6 +745,9 @@ 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';