diff --git a/core/variables.js b/core/variables.js index 38720c49..73bce66c 100644 --- a/core/variables.js +++ b/core/variables.js @@ -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: - */ -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: value - */ -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) { - // - // variablename - // - 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() { - // - // - // 0 - // - // - 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() { - // - // - // 0 - // - // - 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.