From ac88ca4ac23c7cc349071f79870ce05265c36f7f Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Wed, 30 Oct 2013 16:13:34 -0400 Subject: [PATCH] Add dispose to the correct tree --- static/js/graphing.js | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) 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 = ''; };