diff --git a/core/options.js b/core/options.js index 83c08451..dee2f615 100644 --- a/core/options.js +++ b/core/options.js @@ -45,7 +45,7 @@ Blockly.Options = function(options) { var hasDisable = false; var hasSounds = false; } else { - var languageTree = Blockly.Options.parseToolboxTree_(options['toolbox']); + var languageTree = Blockly.Options.parseToolboxTree(options['toolbox']); var hasCategories = Boolean(languageTree && languageTree.getElementsByTagName('category').length); var hasTrashcan = options['trashcan']; @@ -93,7 +93,7 @@ Blockly.Options = function(options) { this.comments = hasComments; this.disable = hasDisable; this.readOnly = readOnly; - this.maxBlocks = options['maxBlocks'] || Infinity; + this.maxBlocks = options['maxBlocks'] || Infinity; this.pathToMedia = pathToMedia; this.hasCategories = hasCategories; this.hasScrollbars = hasScrollbars; @@ -192,9 +192,8 @@ Blockly.Options.parseGridOptions_ = function(options) { * Parse the provided toolbox tree into a consistent DOM format. * @param {Node|string} tree DOM tree of blocks, or text representation of same. * @return {Node} DOM tree of blocks, or null. - * @private */ -Blockly.Options.parseToolboxTree_ = function(tree) { +Blockly.Options.parseToolboxTree = function(tree) { if (tree) { if (typeof tree != 'string') { if (typeof XSLTProcessor == 'undefined' && tree.outerHTML) { diff --git a/core/workspace_svg.js b/core/workspace_svg.js index aa426118..636fe2df 100644 --- a/core/workspace_svg.js +++ b/core/workspace_svg.js @@ -29,6 +29,7 @@ goog.provide('Blockly.WorkspaceSvg'); // TODO(scr): Fix circular dependencies // goog.require('Blockly.Block'); goog.require('Blockly.ConnectionDB'); +goog.require('Blockly.Options'); goog.require('Blockly.ScrollbarPair'); goog.require('Blockly.Trashcan'); goog.require('Blockly.Workspace'); @@ -937,7 +938,7 @@ Blockly.WorkspaceSvg.prototype.playAudio = function(name, opt_volume) { * @param {Node|string} tree DOM tree of blocks, or text representation of same. */ Blockly.WorkspaceSvg.prototype.updateToolbox = function(tree) { - tree = Blockly.parseToolboxTree_(tree); + tree = Blockly.Options.parseToolboxTree(tree); if (!tree) { if (this.options.languageTree) { throw 'Can\'t nullify an existing toolbox.';