lib/society/formatter/report/templates/components/society-assets/society.js in society-1.4.2 vs lib/society/formatter/report/templates/components/society-assets/society.js in society-1.5.0

- old
+ new

@@ -131,25 +131,25 @@ .classed("society-node--source", false); }; var toggleFilterOnlyDeps = function(d) { if (this.depsFiltered == false) { - nodeAnchor.selectAll(".society-node--faded") - .style("visibility", "hidden"); - linkAnchor.selectAll(".society-link") - .filter(":not(.society-link--source)") - .filter(":not(.society-link--target)") - .style("visibility", "hidden"); - this.depsFiltered = true; + nodeAnchor.selectAll(".society-node--faded") + .style("visibility", "hidden"); + linkAnchor.selectAll(".society-link") + .filter(":not(.society-link--source)") + .filter(":not(.society-link--target)") + .style("visibility", "hidden"); + this.depsFiltered = true; } else { - d3 - .selectAll(".society-node") - .style("visibility", "visible"); - d3 - .selectAll(".society-link") - .style("visibility", "visible"); - this.depsFiltered = false; + d3 + .selectAll(".society-node") + .style("visibility", "visible"); + d3 + .selectAll(".society-link") + .style("visibility", "visible"); + this.depsFiltered = false; } }; document.onkeydown = function(evt) { evt = evt || window.event; @@ -301,16 +301,23 @@ Heatmap.prototype.init = function() { var x = d3.scale.ordinal().rangeBands([0, this.width]), z = d3.scale.linear().domain([0, 4]).clamp(true), c = d3.scale.category10().domain(d3.range(10)); - var orderSelect = this.element.append('select') - .attr('class', 'society-heatmap-select') + var controls = this.element.append('div') + .attr('class', 'society-heatmap-controls'); + + var orderSelectLabel = controls.append('label') + .attr("for", "society-heatmap-select") + .attr('class', 'society-heatmap-select-label') .text('Order by:'); - orderSelect.append('option').text('by Name').attr('value', 'name'); - orderSelect.append('option').text('by Frequency').attr('value', 'count'); - orderSelect.append('option').text('by Cluster').attr('value', 'group'); + + var orderSelect = controls.append('select') + .attr('class', 'society-heatmap-select') + orderSelect.append('option').text('Name').attr('value', 'name'); + orderSelect.append('option').text('Frequency').attr('value', 'count'); + orderSelect.append('option').text('Cluster').attr('value', 'group'); orderSelect.on('change', function() { order(this.value); }); var coOccurrenceSvg = this.element.append("svg") @@ -398,10 +405,9 @@ .attr("class", "society-cell") .attr("x", function(d) { return x(d.x); }) .attr("width", x.rangeBand()) .attr("height", x.rangeBand()) .style("fill-opacity", function(d) { return z(d.z); }) - .style("fill", function(d) { return nodes[d.x].group == nodes[d.y].group ? c(nodes[d.x].group) : null; }) .on("mouseover", mouseover) .on("mouseout", mouseout); } function mouseover(p) {