diff --git a/html/force.css b/html/force.css index 435e8da..32d8ddb 100644 --- a/html/force.css +++ b/html/force.css @@ -21,3 +21,7 @@ line.link { #chart { background-image: url(gplaypattern.png); } + +.node.highlight ellipse { + fill: #FFF0B3; +} diff --git a/html/force.js b/html/force.js index d1815ba..e2e4587 100644 --- a/html/force.js +++ b/html/force.js @@ -67,7 +67,14 @@ d3.json("nodes.json", function(json) {  function fade(opacity) {         return function(d) {             node.style("stroke-opacity", function(o) { -                 thisOpacity = isConnected(d, o) ? 1 : opacity; + var connected = isConnected(d, o); + + if (connected && opacity != 1) + d3.select(this).classed("highlight", true); + else + d3.select(this).classed("highlight", false); + +                 thisOpacity = connected ? 1 : opacity;                 this.setAttribute('fill-opacity', thisOpacity);                 return thisOpacity;             });