From 5f53ca2f1e207eda0ed549dce2dfa4e6bd68f633 Mon Sep 17 00:00:00 2001 From: Nils Schneider Date: Sat, 18 Aug 2012 15:02:02 +0200 Subject: [PATCH] make unidirectional links thinner --- html/force-big.css | 4 ++++ html/force-light.css | 7 ++++++- html/force.js | 3 +++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/html/force-big.css b/html/force-big.css index 47bef13..ad4d0d8 100644 --- a/html/force-big.css +++ b/html/force-big.css @@ -24,6 +24,10 @@ stroke-width: 2px; } +.link line.unidirectional { + stroke-width: 2px; +} + .node ellipse { fill: #fff; stroke: #48f; diff --git a/html/force-light.css b/html/force-light.css index d2e25f9..af03287 100644 --- a/html/force-light.css +++ b/html/force-light.css @@ -15,12 +15,17 @@ .link line { stroke: #777; stroke-opacity: 1; - stroke-width: 1.5px; + stroke-width: 2.5px; +} + +.link line.unidirectional { + stroke-width: 0.8px; } .link.vpn line { stroke-dasharray: 0.75px 4px; stroke-linecap: round; + stroke-width: 1.5px; } .link:hover line { diff --git a/html/force.js b/html/force.js index 5f94e8e..05e77d5 100644 --- a/html/force.js +++ b/html/force.js @@ -415,6 +415,9 @@ function update() { .style("stroke", function(d) { return linkcolor(Math.max.apply(null, d.quality.split(","))) }) + .attr("class", function(d) { + return d.quality.split(",").length==1?"unidirectional":"bidirectional" + }) link.selectAll("title") .text( function (d) {