Merge pull request #50 from sensebox/add-default-types

add default types
This commit is contained in:
Mario Pesch 2020-12-18 10:21:09 +01:00 committed by GitHub
commit d91d22cdee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View File

@ -2,7 +2,7 @@
import Blockly from 'blockly';
import { getColour } from '../helpers/colour';
import { getCompatibleTypes } from '../helpers/types'
import * as Types from '../helpers/types';
Blockly.Blocks['controls_whileUntil'] = {
/**
@ -47,6 +47,7 @@ Blockly.Blocks['controls_for'] = {
{
"type": "field_variable",
"name": "VAR",
"defaultType": Types.NUMBER.typeName,
"variable": null
},
{
@ -97,6 +98,7 @@ Blockly.Blocks['controls_forEach'] = {
{
"type": "field_variable",
"name": "VAR",
"defaultType": Types.NUMBER.typeName,
"variable": null
},
{

View File

@ -287,7 +287,8 @@ Blockly.Blocks['math_change'] = {
{
"type": "field_variable",
"name": "VAR",
"variable": Blockly.Msg.MATH_CHANGE_TITLE_ITEM
"defaultType": Types.NUMBER.typeName,
"variable": null
},
{
"type": "input_value",