d3-textwrap
d3-textwrap copied to clipboard
callback function once wrapping complete?
I want to position the newly wrapped text, but I've noticed that immediately after .call(wrap)
if I try to get the boundingClientRect, it is not accurate. I need to set a short timeout (~100ms) to get the right calculated bounds.
That's definitely unexpected, but I'm reluctant to add a callback argument to the API of this function in order to fix it – maybe use a MutationObserver instead?