You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thank you for taking the time to report an issue with react-d3-tree!
Feel free to delete any questions that do not apply.
Are you reporting a bug, or opening a feature request?
BUG
What is the actual behavior/output?
After enabling the dimensions prop, the center node feature works only when toggling the node. If you disable the collapsible feature, for instance, it doesn't work at all.
What is the behavior/output you expect?
When enabling the dimensions prop, I expect that the onNodeClick event handler triggers the centering of the given node.
Can you consistently reproduce the issue/create a reproduction case (e.g. on https://codesandbox.io)?
Yes. In fact, when using the example (https://bkrem.github.io/react-d3-tree/), if you enable centerNode and disable collapsible, you'll notice that the node that is clicked does not get centered.
What version of react-d3-tree are you using?
3.3.2
If react-d3-tree crashed with a traceback, please paste the full traceback below.
No crash.
The text was updated successfully, but these errors were encountered:
marcos-medeiros
changed the title
Center Node feature only works when toggling the node when using renderCustomNode. Not working with onNodeClick
Center Node feature only works when toggling the node. Not working with onNodeClick
Mar 25, 2022
I can confirm that this is still a problem. I discovered it when trying to center a custom element passed in using the "renderCustomNodeElement" prop. I just spent a couple hours digging through the code, but I believe fixing this bug is a bit beyond my skill level.
Thank you for taking the time to report an issue with react-d3-tree!
Feel free to delete any questions that do not apply.
Are you reporting a bug, or opening a feature request?
BUG
What is the actual behavior/output?
After enabling the dimensions prop, the center node feature works only when toggling the node. If you disable the
collapsible
feature, for instance, it doesn't work at all.What is the behavior/output you expect?
When enabling the dimensions prop, I expect that the onNodeClick event handler triggers the centering of the given node.
Can you consistently reproduce the issue/create a reproduction case (e.g. on https://codesandbox.io)?
Yes. In fact, when using the example (https://bkrem.github.io/react-d3-tree/), if you enable
centerNode
and disablecollapsible
, you'll notice that the node that is clicked does not get centered.What version of react-d3-tree are you using?
3.3.2
If react-d3-tree crashed with a traceback, please paste the full traceback below.
No crash.
The text was updated successfully, but these errors were encountered: