From 4e2e61f3c677a762638c3705aa4cd7afd948f395 Mon Sep 17 00:00:00 2001 From: Nils Schneider Date: Sat, 11 Apr 2015 01:27:20 +0200 Subject: [PATCH] forcegraph: when highlighting links, also highlight nodes --- lib/forcegraph.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/forcegraph.js b/lib/forcegraph.js index 6208da7..9287122 100644 --- a/lib/forcegraph.js +++ b/lib/forcegraph.js @@ -167,6 +167,7 @@ define(["d3"], function (d3) { if (l) { highlightedLinks = [l] + highlightedNodes = [l.source, l.target] if (!nopanzoom) { var x = d3.extent([l.source, l.target], function (d) { return d.x }) @@ -280,7 +281,7 @@ define(["d3"], function (d3) { if (highlightedLinks.length) { ctx.save() - ctx.lineWidth = 16 + ctx.lineWidth = 10 ctx.strokeStyle = "#FFD486" highlightedLinks.forEach(function (d) {