From: Tim Bunce Date: Tue, 2 Oct 2012 19:28:10 +0000 (+0100) Subject: Tweak tooltip. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c98b4b83196cccb18982310cf39c5896f61f225e;p=p5sagit%2FDevel-Size.git Tweak tooltip. --- diff --git a/static/public/treemap.js b/static/public/treemap.js index 2c707a1..c01239b 100644 --- a/static/public/treemap.js +++ b/static/public/treemap.js @@ -157,7 +157,8 @@ function init(){ html += sprintf("Child use: %s
", bytesToSize(data.kids_size,2)); } if (data.self_size) { - html += sprintf("Own use: %s
", bytesToSize(data.self_size,2)); + if (data.kids_size) + html += sprintf("Own use: %s
", bytesToSize(data.self_size,2)); html += sprintf("
"); bySortedValue(data.leaves, function(a, b) { return a[1] - b[1] }, @@ -167,8 +168,9 @@ function init(){ } html += "
"; + html += sprintf("
"); - if (0) { + if (1) { html += sprintf("Attributes:
"); bySortedValue(data.attr, function(a, b) { return a[0] > b[0] ? 1 : a[0] < b[0] ? -1 : 0 }, @@ -177,7 +179,6 @@ function init(){ html += "
"; } - html += sprintf("
"); if (data.child_count) { //html += sprintf("Children: %d of %d
", data.child_count, data.kids_node_count); html += sprintf("Children: %d
", data.kids_node_count); @@ -186,7 +187,7 @@ function init(){ html += sprintf("Depth: %d
", data.depth); html += sprintf("Parent: %d
", data.parent_id); - //html += JSON.stringify(data.attr, undefined, 4); + html += JSON.stringify(data.attr, undefined, 4); //html += JSON.stringify(data, undefined, 4); html += sprintf("
");