bumbeishvili / org-chart

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

Add a hook to wait for the completion of fit #269

Closed m-gallesio closed 1 year ago

m-gallesio commented 1 year ago

Greetings. I think it would be useful to have a way to know when a fit() operation has actually concluded instead of having to rely on timeouts. D3 transitions natively provides a end() method which returns a Promise: https://observablehq.com/@d3/transition-end. Similar hooks could be useful in other spots I am not aware of.

bumbeishvili commented 1 year ago

That is a good idea, will keep it in mind

bumbeishvili commented 1 year ago

Added the following callback support in the dev

image

Will be merged with this PR

213