Wrap SVG text
Add a G.textwrap()
(better name required) that
- Takes an SVG
<text
> node as input - Reads its text content as a string, concatenating any child
<tspan>
elements - Wraps it to a width specified by the
width=
attribute on the text, or from an option passed toG.textwrap()
- Vertically aligned based on ... (?)
- Using
<tspan>
elements, roughly along the lines ofsvg.textflow.js: see demohttp://bl.ocks.org/mbostock/7555321 or http://stackoverflow.com/a/7059050 - With no dependencies on D3, but perhaps on jQuery