mirror of
https://github.com/scratchfoundation/scratch-blocks.git
synced 2025-07-29 23:29:05 -04:00
Remove unused variable category code.
It had been moved to the data_category.js file. It is dead code now.
This commit is contained in:
parent
d735d33351
commit
db865f24f4
1 changed files with 0 additions and 77 deletions
|
@ -104,83 +104,6 @@ Blockly.Variables.allVariables = function(root) {
|
|||
return root.getAllVariables();
|
||||
};
|
||||
|
||||
/**
|
||||
* Create a dom element for a value tag with the given name attribute.
|
||||
* @param {string} name The value to use for the name attribute.
|
||||
* @return {!Element} An XML element: <value name="name"></value>
|
||||
*/
|
||||
Blockly.Variables.createValueDom_ = function(name) {
|
||||
var value = goog.dom.createDom('value');
|
||||
value.setAttribute('name', name);
|
||||
return value;
|
||||
};
|
||||
|
||||
/**
|
||||
* Create a dom element for a shadow tag with the given tupe attribute.
|
||||
* @param {string} type The value to use for the type attribute.
|
||||
* @param {string} value The value to have inside the tag.
|
||||
* @return {!Element} An XML element: <shadow type="type">value</shadow>
|
||||
*/
|
||||
Blockly.Variables.createShadowDom_ = function(type) {
|
||||
var shadow = goog.dom.createDom('shadow');
|
||||
shadow.setAttribute('type', type);
|
||||
return shadow;
|
||||
};
|
||||
|
||||
/**
|
||||
* Create a dom element for variable.
|
||||
* @param {Blockly.VariableModel} variableModel The variable to use.
|
||||
* @return {!Element} An XML element.
|
||||
*/
|
||||
Blockly.Variables.createVariableDom_ = function(variableModel) {
|
||||
// <field name="VARIABLE">
|
||||
// variablename
|
||||
// </field>
|
||||
var field = goog.dom.createDom('field', null, variableModel.name);
|
||||
field.setAttribute('name', 'VARIABLE');
|
||||
field.setAttribute('variableType', variableModel.type);
|
||||
field.setAttribute('id', variableModel.getId());
|
||||
return field;
|
||||
};
|
||||
|
||||
/**
|
||||
* Create a dom element for value tag with a shadow text inside.
|
||||
* @return {!Element} An XML element.
|
||||
*/
|
||||
Blockly.Variables.createTextDom_ = function() {
|
||||
// <value name="VALUE">
|
||||
// <shadow type="text">
|
||||
// <field name="TEXT">0</field>
|
||||
// </shadow>
|
||||
// </value>
|
||||
var value = Blockly.Variables.createValueDom_('VALUE');
|
||||
var shadow = Blockly.Variables.createShadowDom_('text');
|
||||
var field = goog.dom.createDom('field', null, '0');
|
||||
field.setAttribute('name', 'TEXT');
|
||||
shadow.appendChild(field);
|
||||
value.appendChild(shadow);
|
||||
return value;
|
||||
};
|
||||
|
||||
/**
|
||||
* Create a dom element for value tag with a shadow number inside.
|
||||
* @return {!Element} An XML element.
|
||||
*/
|
||||
Blockly.Variables.createMathNumberDom_ = function() {
|
||||
// <value name="VALUE">
|
||||
// <shadow type="math_number">
|
||||
// <field name="NUM">0</field>
|
||||
// </shadow>
|
||||
// </value>
|
||||
var value = Blockly.Variables.createValueDom_('VALUE');
|
||||
var shadow = Blockly.Variables.createShadowDom_('math_number');
|
||||
var field = goog.dom.createDom('field', null, '1');
|
||||
field.setAttribute('name', 'NUM');
|
||||
shadow.appendChild(field);
|
||||
value.appendChild(shadow);
|
||||
return value;
|
||||
};
|
||||
|
||||
/**
|
||||
* Return the text that should be used in a field_variable or
|
||||
* field_variable_getter when no variable exists.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue