Start using field_number.

This commit is contained in:
Neil Fraser
2016-06-21 04:10:32 -07:00
parent 4b319d461d
commit 732e9b0659
7 changed files with 145 additions and 25 deletions

View File

@@ -43,8 +43,7 @@ Blockly.Blocks['math_number'] = {
this.setHelpUrl(Blockly.Msg.MATH_NUMBER_HELPURL);
this.setColour(Blockly.Blocks.math.HUE);
this.appendDummyInput()
.appendField(new Blockly.FieldNumber('0',
Blockly.FieldTextInput.numberValidator), 'NUM');
.appendField(new Blockly.FieldNumber('0'), 'NUM');
this.setOutput(true, 'Number');
// Assign 'this' to a variable for use in the tooltip closure below.
var thisBlock = this;