Dispose of toolbox when workspace is disposed.

This commit is contained in:
Neil Fraser 2015-06-04 12:04:43 -07:00
parent af056f9028
commit 8202ebf07d
6 changed files with 69 additions and 54 deletions

View file

@ -139,6 +139,15 @@ Blockly.Toolbox.prototype.init = function() {
this.position();
};
/**
* Dispose of this toolbox.
*/
Blockly.Toolbox.prototype.dispose = function() {
this.flyout_.dispose();
this.tree_.dispose();
goog.dom.removeNode(this.HtmlDiv);
};
/**
* Move the toolbox to the edge.
*/