From 5b7e6591f088a3e8466b1072adbc5b2832330697 Mon Sep 17 00:00:00 2001 From: schneefux Date: Sun, 10 Apr 2016 16:20:58 +0200 Subject: layout optimizations --- code/weightvis.js | 9 ++++++++- code/weightviswrapper.js | 1 + index.css | 4 ++++ index.html | 19 ++++++++++++++++--- 4 files changed, 29 insertions(+), 4 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) { diff --git a/index.css b/index.css index 55c47f5..1e9256c 100644 --- a/index.css +++ b/index.css @@ -86,3 +86,7 @@ table.center { .sources-list { margin: 1em; } + +#io h3 { + padding-bottom: 1em; +} diff --git a/index.html b/index.html index 5f9cff0..da8f4c5 100644 --- a/index.html +++ b/index.html @@ -20,7 +20,6 @@ -
-- cgit v1.3.1