I need my vertex label displayed entirely inside vertex bounds. I mean if my label is too long then part of it will be displayed outside the vertex box. Is there any way to automatically split label into multiple lines and make it fit the vertex bounds? This line breaks should be recalculated after vertex resize. Can i do it using styles? mxUtils.wordWrap() seems to be the way but i cannot figure out how to use it properly. Give me an example of using it please.\nThanks for your answers

asked 05 Apr '12, 03:58

dvoryadkin1989's gravatar image

accept rate: 0%

edited 05 Apr '12, 05:01

Use whiteSpace=wrap


answered 05 Apr '12, 06:04

Gaudenz's gravatar image

accept rate: 39%

can you be more specific, please? I didn't understand your idea clearly

(05 Apr '12, 23:46) dvoryadkin1989

graph.insertVertex(parent, null, "", x, y, w, h, "whiteSpace=wrap")

(06 Apr '12, 02:46) Gaudenz
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: 05 Apr '12, 03:58

Seen: 2,819 times

Last updated: 06 Apr '12, 02:46