link all nodes

This commit is contained in:
j 2018-08-10 14:29:27 +01:00
parent 3fd2380475
commit 059ac97dd4

View file

@ -47,9 +47,6 @@ function get_color(d) {
if (d.children || d._children) {
return '#fff'
}
if (d.size == 1) {
return "gray";
}
return "lightsteelblue";
}
function update(source) {
@ -80,7 +77,7 @@ function update(source) {
.attr("dy", ".35em")
.attr("text-anchor", function(d) { return d.children || d._children ? "end" : "start"; })
.text(function(d) {
if (d.children || d._children || d.size == 1) {
if (d.children || d._children) {
return d.name;
}
return d.name + ' (' + d.size + ')';
@ -154,7 +151,7 @@ function click(d) {
d.children = d._children;
d._children = null;
}
if (!d.children && ! d._children && d.size > 1) {
if (!d.children && ! d._children) {
var name = d.parent.name + ': ' + d.name
document.location.href = '/clip/created/keywords=' + name
}