forcegraph: when highlighting links, also highlight nodes

This commit is contained in:
Nils Schneider 2015-04-11 01:27:20 +02:00
parent 7ebc4c5571
commit 4e2e61f3c6

View file

@ -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) {