From: Tim Bunce Date: Sun, 16 Sep 2012 15:46:17 +0000 (+0100) Subject: Working(ish) on demand demo using statis data X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b55e46863fa8b9e3921966ffd2627a1993fcc2e0;p=p5sagit%2FDevel-Size.git Working(ish) on demand demo using statis data --- diff --git a/static/tm.html b/static/tm.html index 32b349e..876ca07 100644 --- a/static/tm.html +++ b/static/tm.html @@ -14,6 +14,7 @@ + diff --git a/static/tm.js b/static/tm.js index c4792bf..909d6a6 100644 --- a/static/tm.js +++ b/static/tm.js @@ -118,9 +118,10 @@ function init(){ //call for the requested subtree. When completed, the onComplete //callback method should be called. request: function(nodeId, level, onComplete){ - var tree = eval('(' + json + ')'); + //var tree = eval('(' + json + ')'); + var tree = memnodes[0]; var subtree = $jit.json.getSubtree(tree, nodeId); - $jit.json.prune(subtree, 1); + $jit.json.prune(subtree, 2); onComplete.onComplete(nodeId, subtree); }, //Add the name of the node in the corresponding label @@ -130,8 +131,9 @@ function init(){ } }); - var pjson = eval('(' + json + ')'); - $jit.json.prune(pjson, 1); + //var pjson = eval('(' + json + ')'); + var pjson = memnodes[0]; + $jit.json.prune(pjson, 2); tm.loadJSON(pjson); tm.refresh(); diff --git a/static/tm0data.js b/static/tmdata.js similarity index 100% rename from static/tm0data.js rename to static/tmdata.js