diff options
Diffstat (limited to 'code')
| -rw-r--r-- | code/weightvis.js | 9 | ||||
| -rw-r--r-- | code/weightviswrapper.js | 1 |
2 files changed, 9 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); }; diff --git a/code/weightviswrapper.js b/code/weightviswrapper.js index 1a0c5a6..4b0697b 100644 --- a/code/weightviswrapper.js +++ b/code/weightviswrapper.js @@ -149,6 +149,7 @@ var WeightVisWrapper = (function() { this.controlBarAttached = false; } this.reposition(); + this.netVisualizer.clearNodeHighlights(); }; WeightVisWrapper.prototype.remove = function(el) { |
