diff --git a/static/js/graphing.js b/static/js/graphing.js index 88aedc5da..5581dc3ce 100644 --- a/static/js/graphing.js +++ b/static/js/graphing.js @@ -715,7 +715,17 @@ ImageHistoryTree.prototype.toggle_ = function(d) { } }; -///////////////////////////////////////////////////////////////////////////////////////// + +/** + * Disposes of the tree. + */ +ImageHistoryTree.prototype.dispose = function() { + var container = this.container_ ; + $('#' + container).removeOverscroll(); + document.getElementById(container).innerHTML = ''; +}; + +//////////////////////////////////////////////////////////////////////////////// /** * Based off of http://bl.ocks.org/mbostock/1093025 by Mike Bostock (@mbostock) @@ -814,8 +824,7 @@ ImageFileChangeTree.prototype.notifyResized = function() { */ ImageFileChangeTree.prototype.dispose = function() { var container = this.container_ ; - $('#' + container).removeOverscroll(); - document.getElememtById(container).innerHTML = ''; + document.getElementById(container).innerHTML = ''; };