46 .style("width", function(d) { return Math.max(10 + d.r, d.r) * 2 + 'px'; }) |
47 .style("width", function(d) { return Math.max(10 + d.r, d.r) * 2 + 'px'; }) |
47 .style("height", function(d) { return Math.max(10 + d.r, d.r) * 2 + 'px'; }) |
48 .style("height", function(d) { return Math.max(10 + d.r, d.r) * 2 + 'px'; }) |
48 .style("position", "absolute") |
49 .style("position", "absolute") |
49 .style("left", function(d) { return d.x - Math.max(10 + d.r, d.r) + 'px'; }) |
50 .style("left", function(d) { return d.x - Math.max(10 + d.r, d.r) + 'px'; }) |
50 .style("top", function(d) { return d.y - Math.max(10 + d.r, d.r) + 'px'; }) |
51 .style("top", function(d) { return d.y - Math.max(10 + d.r, d.r) + 'px'; }) |
51 .on('click', function(d) { self.get('setQueryParameters')(d.id); }); |
52 .on('click', function(d) { |
|
53 self.get('filter').set('discourse', d.id); |
|
54 }); |
52 |
55 |
53 item.append("span") |
56 item.append("span") |
54 .text(function(d) { return d.name; }) |
57 .text(function(d) { return d.name; }) |
55 .style("text-align", "center") |
58 .style("text-align", "center") |
56 .style("display", function(d) { return d.children ? 'none' : 'inline-block'; }) |
59 .style("display", function(d) { return d.children ? 'none' : 'inline-block'; }) |
71 svg_nodes.enter().append("g") |
74 svg_nodes.enter().append("g") |
72 .attr("class", function(d) { return "node" + (!d.children ? " leaf" : ""); }) |
75 .attr("class", function(d) { return "node" + (!d.children ? " leaf" : ""); }) |
73 .attr("transform", function(d) { return "translate(" + d.x + "," + d.y + ")"; }); |
76 .attr("transform", function(d) { return "translate(" + d.x + "," + d.y + ")"; }); |
74 |
77 |
75 var leaf = svg.selectAll(".leaf") |
78 var leaf = svg.selectAll(".leaf") |
76 .on('click', function(d) { self.get('setQueryParameters')(d.id); }); |
79 .on('click', function(d) { |
|
80 self.get('filter').set('discourse', d.id); |
|
81 }); |
77 |
82 |
78 leaf.append("circle") |
83 leaf.append("circle") |
79 .attr("r", function(d) { return Math.max(7.5 + d.r * 2, d.r * 2); }) |
84 .attr("r", function(d) { return Math.max(7.5 + d.r * 2, d.r * 2); }) |
80 .attr("fill", function(d) { return d.fill; }) |
85 .attr("fill", function(d) { return d.fill; }) |
81 .attr("stroke", function() { return "#000"; }); |
86 .attr("stroke", function() { return "#000"; }); |