bkrem / react-d3-tree

:deciduous_tree: React component to create interactive D3 tree graphs
https://bkrem.github.io/react-d3-tree
MIT License
1.06k stars 268 forks source link

[Question] How can I retrieve the position of child nodes in a search function? #467

Closed kasumil closed 1 year ago

kasumil commented 1 year ago

hello. everyone.

I'm trying to find the position of a child node in react-d3-tree. I don't know how to implement that feature, but can you tell me how to do it?

I want to implement a search function and center the node. The data search found the tag through the for statement, but it is difficult to implement the search function because the location value of the node is not known.

What version of react-d3-tree are you using?

[Replace with your answer] 3.3.6

kasumil commented 1 year ago

i solved it There is no callback point function. The element has a point.

ZeaTorch commented 3 months ago

Did your solution allow for centering a node externally? I also need to search and center but can't figure it out.

kasumil commented 3 months ago

Did your solution allow for centering a node externally? I also need to search and center but can't figure it out.

I have read the content carefully. However, I couldn't solve the problem either. Instead, I only implemented the function to move near the center, not exactly to the center."

flytrap commented 1 month ago

Can you tell me how you solved it?