bumbeishvili / org-chart

Highly customizable org chart. Integrations available for Angular, React, Vue
https://stackblitz.com/edit/web-platform-o5t1ha
MIT License
928 stars 330 forks source link

Connect to the center of the node #380

Open wolfag opened 7 months ago

wolfag commented 7 months ago

Currently, Im working on a project that show user all nodes with the add button at the end of every leaf node. Cause by the add button just has an icon (the others node is a card) so we can see the connection line is blank at the end before reach to the add button. Can we make the connection reach to the center of the node? Thanks.

bumbeishvili commented 7 months ago

@wolfag can you provide a reproduced sample?

You can expand one of the examples

https://github.com/bumbeishvili/org-chart?tab=readme-ov-file#features

wolfag commented 7 months ago

@bumbeishvili like this, so if we can make the connection reach to the center of the node we can fix the issue if you want more info pls mention me. Thanks

Screenshot 2024-04-08 at 14 52 28
bumbeishvili commented 7 months ago

@wolfag it's possible, one of the properties in this list controls that. I don't remember which one, guess you have to try overriding them out one by one

https://github.com/bumbeishvili/org-chart/blob/d9334eb2c1f9c7b0babebb5d05fa10987f2f2233/src/d3-org-chart.js#L345-L361

wolfag commented 7 months ago

@bumbeishvili could you show me how to override