javascript - Find/recenter arbitrary node in d3 force-directed layout -


i have force-directed graph large number of nodes (thousands) - volume of data makes specific node difficult locate in graph. love have way search specific node, , recenter graph on it.

is parsing force.nodes() specific data value , somehow recentering graph on node? or more complicated that?

not troublesome. once you've identified special node, re-run layout own tick handler. in tick handler, set special node's x , y properties keep centered. layout algorithm adjust other nodes accordingly.

for smoother user experience, incrementally move node it's starting position center within tick handler.


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -