mirror of
https://github.com/google/blockly.git
synced 2026-01-07 17:10:11 +01:00
Add VariableType checks.
This commit is contained in:
@@ -1245,7 +1245,8 @@ Blockly.Block.newFieldTextInputFromJson_ = function(options) {
|
||||
*/
|
||||
Blockly.Block.newFieldVariableFromJson_ = function(options) {
|
||||
var varname = Blockly.utils.replaceMessageReferences(options['variable']);
|
||||
return new Blockly.FieldVariable(varname);
|
||||
var variableTypes = options['variableTypes'];
|
||||
return new Blockly.FieldVariable(varname, null, variableTypes);
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user