-
Notifications
You must be signed in to change notification settings - Fork 275
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Find node by ID #470
Comments
@Bones5 if you're passing a Once you have the node object you intend to focus the camera, you can simply use react-force-graph/example/click-to-focus/index.html Lines 27 to 31 in ac46439
|
Thanks for the reply. That is the example I was using, rather than on click though I would like to use an external link/route to navigate to the node. This means I don't have the position of the node passed from the onClick function, only the ID of the node. Is there a way to achieve this? |
Yes, you just need to search for the node in your own |
Ah, I see now, the position is appended to my original object. Sorry, I knew I was missing something. Thanks very much! |
I am trying to select a node from the graph by its ID and centre the camera on that nodes position. Is that currently possible?
I feel like I'm missing something but I can't gain access to the graphData once it has been provided to locate the node.
Would a findNodeByyId utility function be possible?
The text was updated successfully, but these errors were encountered: