From 94627fc61195ddb925854c0a9352e1a87136229c Mon Sep 17 00:00:00 2001 From: Martin Geno Date: Fri, 24 Mar 2017 11:40:11 +0100 Subject: [PATCH] [BUGFIX] select node from nodelist in forcegrap --- lib/forcegraph.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/forcegraph.js b/lib/forcegraph.js index 30843cc..43592de 100644 --- a/lib/forcegraph.js +++ b/lib/forcegraph.js @@ -200,13 +200,12 @@ define(['d3-selection', 'd3-force', 'd3-zoom', 'd3-drag', 'utils/math', 'forcegr }; self.gotoNode = function gotoNode(d) { - draw.setHighlight({ type: 'node', o: d }); - for (var i = 0; i < intNodes.length; i++) { var n = intNodes[i]; - if (n.o.node !== d) { + if (n.o.node.nodeinfo.node_id !== d.nodeinfo.node_id) { continue; } + draw.setHighlight({ type: 'node', o: n.o.node }); transform.k = (ZOOM_MAX + 1) / 2; moveTo(n.x, n.y); break;