diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2016-04-10 16:20:58 +0200 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2016-04-10 16:20:58 +0200 |
| commit | 5b7e6591f088a3e8466b1072adbc5b2832330697 (patch) | |
| tree | 17debdf223fbf154c1af64fa952083b2901b4ffa /code/weightvis.js | |
| parent | 5674b4f788b88c0d69c48b78eab6abf1b2ccb8ff (diff) | |
| download | vortrag-knn-5b7e6591f088a3e8466b1072adbc5b2832330697.tar.gz vortrag-knn-5b7e6591f088a3e8466b1072adbc5b2832330697.zip | |
layout optimizations
Diffstat (limited to 'code/weightvis.js')
| -rw-r--r-- | code/weightvis.js | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/code/weightvis.js b/code/weightvis.js index 428d3ce..b964367 100644 --- a/code/weightvis.js +++ b/code/weightvis.js @@ -517,7 +517,14 @@ var NetVisualizer = (function() { min = d3.min(flatActivations, Math.abs); var node = this.svg.selectAll(".node"); node.each(function(d) { d.altLayout = activations[d.layer][d.node]>0; }) - .attr("r", function(d) { return 2 * d.r * (Math.abs(activations[d.layer][d.node]) - min) / (max-min); }) + .attr("r", function(d) { return 2 * d.r * (Math.abs(activations[d.layer][d.node]) - min) / (max-min); }) + .style("fill", fNodeColor); + }; + + NetVisualizer.prototype.clearNodeHighlights = function() { + this.svg.selectAll(".node") + .each(function(d) { d.altLayout = false; }) + .attr("r", function(d) { return d.r; }) .style("fill", fNodeColor); }; |
