Adding controls_ifelse block ()

Adding controls_ifelse, an if/else block that is loaded from JSON and does not use mutators. This gives "else" capability to Android & iOS implementations, which don't support JavaScript mutators.

Added this block to the playground simple toolbox and all generators.
This commit is contained in:
Andrew n marshall 2016-10-31 11:00:39 -07:00 committed by GitHub
parent 0156f2e103
commit 72ff6d9ead
8 changed files with 115 additions and 63 deletions

View file

@ -239,6 +239,9 @@ Blockly.Msg.CONTROLS_IF_ELSE_TITLE_ELSE = Blockly.Msg.CONTROLS_IF_MSG_ELSE;
/// tooltip - Describes the 'else' subblock during [https://github.com/google/blockly/wiki/IfElse#block-modification if block modification].
Blockly.Msg.CONTROLS_IF_ELSE_TOOLTIP = 'Add a final, catch-all condition to the if block.';
/// block text - See [https://github.com/google/blockly/wiki/IfElse https://github.com/google/blockly/wiki/IfElse]. The English word "otherwise" would probably be superior to "else", but the latter is used because it is traditional and shorter.
Blockly.Msg.CONTROLS_IFELSE_TITLE = 'if %1 do %2 else %3';
/// url - Information about comparisons.
Blockly.Msg.LOGIC_COMPARE_HELPURL = 'https://en.wikipedia.org/wiki/Inequality_(mathematics)';
/// tooltip - Describes the equals (=) block.