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

fix: incorrect condition on zoom event #455

Closed Liu233w closed 1 year ago

Liu233w commented 1 year ago

If we double click and drag the canvas, there will be an event that does not meet the condition and the function does not return before the attr call, so the tree is re-positioned even if draggable is false.

bkrem commented 1 year ago

Thank you for raising this 🙏

Your suggestion broke the draggability even when draggable was enabled. Based on your feedback I added the dblclick event to the checks though and published as part of https://github.com/bkrem/react-d3-tree/releases/tag/v3.5.2

Need to close this unfortunately but cknowledged you in the release notes :)

Liu233w commented 1 year ago

Thanks :)