Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
ardublockly
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
ardublockly
Commits
572aef78
Commit
572aef78
authored
Jan 27, 2016
by
carlosperate
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert blockly demos to not use blockly types.
parent
2f035065
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
12 deletions
+12
-12
blockly/demos/blockfactory/blocks.js
blockly/demos/blockfactory/blocks.js
+7
-7
blockly/demos/graph/index.html
blockly/demos/graph/index.html
+2
-2
blockly/demos/plane/blocks.js
blockly/demos/plane/blocks.js
+3
-3
No files found.
blockly/demos/blockfactory/blocks.js
View file @
572aef78
...
@@ -55,10 +55,10 @@ Blockly.Blocks['factory_base'] = {
...
@@ -55,10 +55,10 @@ Blockly.Blocks['factory_base'] = {
.
appendField
(
'
colour
'
);
.
appendField
(
'
colour
'
);
/*
/*
this.appendValueInput('TOOLTIP')
this.appendValueInput('TOOLTIP')
.setCheck(
Blockly.StaticTyping.BlocklyTypes.TEXT.compatibles()
)
.setCheck(
'String'
)
.appendField('tooltip');
.appendField('tooltip');
this.appendValueInput('HELP')
this.appendValueInput('HELP')
.setCheck(
Blockly.StaticTyping.BlocklyTypes.TEXT.compatibles()
)
.setCheck(
'String'
)
.appendField('help url');
.appendField('help url');
*/
*/
this
.
setTooltip
(
'
Build a custom block by plugging
\n
'
+
this
.
setTooltip
(
'
Build a custom block by plugging
\n
'
+
...
@@ -608,7 +608,7 @@ Blockly.Blocks['type_group_item'] = {
...
@@ -608,7 +608,7 @@ Blockly.Blocks['type_group_item'] = {
Blockly
.
Blocks
[
'
type_null
'
]
=
{
Blockly
.
Blocks
[
'
type_null
'
]
=
{
// Null type.
// Null type.
valueType
:
Blockly
.
StaticTyping
.
BlocklyTypes
.
NULL
.
basicType
,
valueType
:
null
,
init
:
function
()
{
init
:
function
()
{
this
.
setColour
(
230
);
this
.
setColour
(
230
);
this
.
appendDummyInput
()
this
.
appendDummyInput
()
...
@@ -621,7 +621,7 @@ Blockly.Blocks['type_null'] = {
...
@@ -621,7 +621,7 @@ Blockly.Blocks['type_null'] = {
Blockly
.
Blocks
[
'
type_boolean
'
]
=
{
Blockly
.
Blocks
[
'
type_boolean
'
]
=
{
// Boolean type.
// Boolean type.
valueType
:
Blockly
.
StaticTyping
.
BlocklyTypes
.
BOOLEAN
.
basicType
,
valueType
:
'
Boolean
'
,
init
:
function
()
{
init
:
function
()
{
this
.
setColour
(
230
);
this
.
setColour
(
230
);
this
.
appendDummyInput
()
this
.
appendDummyInput
()
...
@@ -634,7 +634,7 @@ Blockly.Blocks['type_boolean'] = {
...
@@ -634,7 +634,7 @@ Blockly.Blocks['type_boolean'] = {
Blockly
.
Blocks
[
'
type_number
'
]
=
{
Blockly
.
Blocks
[
'
type_number
'
]
=
{
// Number type.
// Number type.
valueType
:
Blockly
.
StaticTyping
.
BlocklyTypes
.
NUMBER
.
basicType
,
valueType
:
'
Number
'
,
init
:
function
()
{
init
:
function
()
{
this
.
setColour
(
230
);
this
.
setColour
(
230
);
this
.
appendDummyInput
()
this
.
appendDummyInput
()
...
@@ -647,7 +647,7 @@ Blockly.Blocks['type_number'] = {
...
@@ -647,7 +647,7 @@ Blockly.Blocks['type_number'] = {
Blockly
.
Blocks
[
'
type_string
'
]
=
{
Blockly
.
Blocks
[
'
type_string
'
]
=
{
// String type.
// String type.
valueType
:
Blockly
.
StaticTyping
.
BlocklyTypes
.
TEXT
.
basicType
,
valueType
:
'
String
'
,
init
:
function
()
{
init
:
function
()
{
this
.
setColour
(
230
);
this
.
setColour
(
230
);
this
.
appendDummyInput
()
this
.
appendDummyInput
()
...
@@ -660,7 +660,7 @@ Blockly.Blocks['type_string'] = {
...
@@ -660,7 +660,7 @@ Blockly.Blocks['type_string'] = {
Blockly
.
Blocks
[
'
type_list
'
]
=
{
Blockly
.
Blocks
[
'
type_list
'
]
=
{
// List type.
// List type.
valueType
:
Blockly
.
StaticTyping
.
BlocklyTypes
.
ARRAY
.
basicType
,
valueType
:
'
Array
'
,
init
:
function
()
{
init
:
function
()
{
this
.
setColour
(
230
);
this
.
setColour
(
230
);
this
.
appendDummyInput
()
this
.
appendDummyInput
()
...
...
blockly/demos/graph/index.html
View file @
572aef78
...
@@ -197,7 +197,7 @@ Blockly.Blocks['graph_get_x'] = {
...
@@ -197,7 +197,7 @@ Blockly.Blocks['graph_get_x'] = {
this
.
setColour
(
330
);
this
.
setColour
(
330
);
this
.
appendDummyInput
()
this
.
appendDummyInput
()
.
appendField
(
'
x
'
);
.
appendField
(
'
x
'
);
this
.
setOutput
(
true
,
Blockly
.
StaticTyping
.
BlocklyTypes
.
NUMBER
.
basicType
);
this
.
setOutput
(
true
,
'
Number
'
);
this
.
setTooltip
(
Blockly
.
Msg
.
VARIABLES_GET_TOOLTIP
);
this
.
setTooltip
(
Blockly
.
Msg
.
VARIABLES_GET_TOOLTIP
);
}
}
};
};
...
@@ -214,7 +214,7 @@ Blockly.Blocks['graph_set_y'] = {
...
@@ -214,7 +214,7 @@ Blockly.Blocks['graph_set_y'] = {
this
.
setColour
(
330
);
this
.
setColour
(
330
);
this
.
appendValueInput
(
'
VALUE
'
)
this
.
appendValueInput
(
'
VALUE
'
)
.
appendField
(
'
y =
'
)
.
appendField
(
'
y =
'
)
.
setCheck
(
Blockly
.
StaticTyping
.
BlocklyTypes
.
NUMBER
.
compatibles
()
);
.
setCheck
(
'
Number
'
);
this
.
setTooltip
(
Blockly
.
Msg
.
VARIABLES_SET_TOOLTIP
);
this
.
setTooltip
(
Blockly
.
Msg
.
VARIABLES_SET_TOOLTIP
);
}
}
};
};
...
...
blockly/demos/plane/blocks.js
View file @
572aef78
...
@@ -49,7 +49,7 @@ Blockly.Blocks['plane_get_rows'] = {
...
@@ -49,7 +49,7 @@ Blockly.Blocks['plane_get_rows'] = {
this
.
setColour
(
330
);
this
.
setColour
(
330
);
this
.
appendDummyInput
()
this
.
appendDummyInput
()
.
appendField
(
Plane
.
getMsg
(
'
Plane_getRows
'
),
'
title
'
);
.
appendField
(
Plane
.
getMsg
(
'
Plane_getRows
'
),
'
title
'
);
this
.
setOutput
(
true
,
Blockly
.
StaticTyping
.
BlocklyType
.
NUMBER
);
this
.
setOutput
(
true
,
'
Number
'
);
},
},
customUpdate
:
function
()
{
customUpdate
:
function
()
{
this
.
setFieldValue
(
this
.
setFieldValue
(
...
@@ -69,7 +69,7 @@ Blockly.Blocks['plane_get_rows1st'] = {
...
@@ -69,7 +69,7 @@ Blockly.Blocks['plane_get_rows1st'] = {
this
.
setColour
(
330
);
this
.
setColour
(
330
);
this
.
appendDummyInput
()
this
.
appendDummyInput
()
.
appendField
(
Plane
.
getMsg
(
'
Plane_getRows1
'
),
'
title
'
);
.
appendField
(
Plane
.
getMsg
(
'
Plane_getRows1
'
),
'
title
'
);
this
.
setOutput
(
true
,
Blockly
.
StaticTyping
.
BlocklyType
.
NUMBER
);
this
.
setOutput
(
true
,
'
Number
'
);
},
},
customUpdate
:
function
()
{
customUpdate
:
function
()
{
this
.
setFieldValue
(
this
.
setFieldValue
(
...
@@ -89,7 +89,7 @@ Blockly.Blocks['plane_get_rows2nd'] = {
...
@@ -89,7 +89,7 @@ Blockly.Blocks['plane_get_rows2nd'] = {
this
.
setColour
(
330
);
this
.
setColour
(
330
);
this
.
appendDummyInput
()
this
.
appendDummyInput
()
.
appendField
(
Plane
.
getMsg
(
'
Plane_getRows2
'
),
'
title
'
);
.
appendField
(
Plane
.
getMsg
(
'
Plane_getRows2
'
),
'
title
'
);
this
.
setOutput
(
true
,
Blockly
.
StaticTyping
.
BlocklyType
.
NUMBER
);
this
.
setOutput
(
true
,
'
Number
'
);
},
},
customUpdate
:
function
()
{
customUpdate
:
function
()
{
this
.
setFieldValue
(
this
.
setFieldValue
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment