From 4272cfb1c1b66bd72b16580f272f79e8305ef58e Mon Sep 17 00:00:00 2001 From: Chris Jackson Date: Fri, 5 Jun 2015 22:15:48 +0100 Subject: [PATCH] Add option to set id on toolbox --- core/toolbox.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/toolbox.js b/core/toolbox.js index 964a097a5..1fb5b5758 100644 --- a/core/toolbox.js +++ b/core/toolbox.js @@ -197,6 +197,10 @@ Blockly.Toolbox.prototype.populate_ = function(newTree) { childOut.setExpanded(true); } treeOut.add(childOut); + var customId = childIn.getAttribute('id'); + if (customId) { + childOut.setId(customId); + } var custom = childIn.getAttribute('custom'); if (custom) { // Variables and procedures are special dynamic categories.