[BUGFIX] select node from nodelist in forcegrap
This commit is contained in:
parent
4b2c5e9157
commit
94627fc611
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user