Add option to set id on toolbox

This commit is contained in:
Chris Jackson
2015-06-05 22:15:48 +01:00
parent e8d68fd95d
commit 4272cfb1c1

View File

@@ -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.