From 9e51bd78fa326c96b9598d5f439efbbcbc083662 Mon Sep 17 00:00:00 2001 From: Nils Schneider Date: Wed, 22 Apr 2015 12:37:18 +0200 Subject: [PATCH] forcegraph: grayscale vpn links --- lib/forcegraph.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/forcegraph.js b/lib/forcegraph.js index b2b30eb..76e8164 100644 --- a/lib/forcegraph.js +++ b/lib/forcegraph.js @@ -553,7 +553,11 @@ define(["d3"], function (d3) { e.o = d e.source = newNodesDict[d.source.id] e.target = newNodesDict[d.target.id] - e.color = linkScale(d.tq).hex() + + if (d.vpn) + e.color = "rgba(0, 0, 0, " + (0.5 / d.tq) + ")" + else + e.color = linkScale(d.tq).hex() return e })