X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=static%2Fpublic%2Ftm.js;h=bd689cd4012e511479f40d0962690381ffa90003;hb=e78b28ca502f26f81baa5eb6f09d0dd810f7d379;hp=5f5b36d3d94a6675386bcd82b0b39f032131cc55;hpb=bb66f8a106436d62b6815aa4d353f54d97a07d87;p=p5sagit%2FDevel-Size.git diff --git a/static/public/tm.js b/static/public/tm.js index 5f5b36d..bd689cd 100644 --- a/static/public/tm.js +++ b/static/public/tm.js @@ -36,7 +36,7 @@ function init(){ //show only one tree level levelsToShow: 1, //parent box title heights - titleHeight: 0, + titleHeight: 11, //enable animations animate: animate, //box offsets @@ -84,7 +84,7 @@ function init(){ } }, //duration of the animations - duration: 1000, + duration: 500, //Enable tips Tips: { enable: true, @@ -100,20 +100,15 @@ function init(){ + "
"; var data = node.data; - //"child_seqns" => 4, - //"depth" => 2, - //"id" => 3, - //"kids_node_count" => 4426, - //"kids_size" => 560058, - //"name" => "SV(PVHV)", - //"parent_seqn" => 2, - //"self_size" => 1080, - - html += sprintf("Name: %s
\n", data.name); html += sprintf("Size: %d (%d + %d)
", data.self_size+data.kids_size, data.self_size, data.kids_size); if (data.child_count) { html += sprintf("Children: %d of %d
", data.child_count, data.kids_node_count); } + html += sprintf("Depth: %d
", data.depth); + html += sprintf("Parent: %d
", data.parent_id); + html += sprintf("Id: %s%s
", node.id, data._ids_merged ? data._ids_merged : ""); + html += JSON.stringify(data.attr, undefined, 4) + "
"; + html += JSON.stringify(data.leaves, undefined, 4) + "
"; tip.innerHTML = html; } @@ -125,7 +120,9 @@ function init(){ //callback method should be called. request: function(nodeId, level, onComplete){ if (true) { - jQuery.getJSON('jit_tree/'+nodeId+'/3', function(data) { + jQuery.getJSON('jit_tree/'+nodeId+'/1', function(data) { + console.log("Node "+nodeId); + console.log(data); onComplete.onComplete(nodeId, data); }); } @@ -144,8 +141,8 @@ function init(){ }); if(true) { - jQuery.getJSON('jit_tree/1/2', function(data) { - console.log(data); + jQuery.getJSON('jit_tree/1/1', function(data) { + console.log(data); tm.loadJSON(data); tm.refresh(); });