d3-textwrap
d3-textwrap copied to clipboard
patch from https://github.com/vijithassar/d3textwrap/issues/1
This is just a PR of the code that is pasted into a comment in #1 -- I have not reviewed this code in detail, but it did fix the issue I was having with text wrapping in Mermaid -- see screenshot.
Note that although #1 references IE, I was having identical issues is Chrome -- the last word getting cut off.
Noting for clarity that the code in this PR is not mine, it is by @willw-git from #1