Skip to content

Fit text

Zack edited this page May 1, 2018 · 13 revisions

Fit text is an option to wrap and fit the text inside a popoto node circle to avoid text cutting by node.

To add the option in the toolbar add

popoto.tools.TOGGLE_FIT_TEXT = true;

To use by default the option add

popoto.graph.USE_FIT_TEXT = true;

Try live example here

The code to fit the text is inspired by a Mike Bostock example found here