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
2 changed files with 5 additions and 2 deletions
+3 -1
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
},
{
+2 -1
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",