Welcome to yEd Q&A! Here you can ask questions and receive answers from other members of the community. And, you can also tell us your most wanted feature requests.
How can I wrap the text in one node, in order to prevent the graph becoming too wide?
Your answer
Email me at this address if my answer is selected or commented on:Email me if my answer is selected or commented on
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.
1 Answer
0 votes
There are two possible solutions:
1. Simply enter line breaks. By default, line breaks are entered using SHIFT+ENTER. If your labels tend to need many line breaks and you'd prefer to use ENTER over SHIFT+ENTER, you can change this in yEd's preferences ("File" -> "Preferences", switch to tab "Editor" and choose "[Enter] creates new line, [Shift+Enter] closes editor" for option "Label Editor").
2. Select the label (by pressing and holding CTRL while left-clicking on the label). Set the property "Size" to "Fit Node Width" and property "Configuration" to "Cropping". (The properties are displayed in yEd's Properties View that is usually located in the lower right corner of yEd.)
But this is not 100% satisfying. It is easy to imagine a situation where node-width is too narrow, and so you end up doing manually inserted lineshifts which is really bad data-discipline - because there is no way for a machine to know if the lineshift is there for a meaningful or a visual reason.
I propose two things:
1. stop calling it 'cropping' in yEd - it's called 'wrapping', cropping means leaving something out.
2. introduce arbitrary label-sizes rather than bind it to the node-size.
Re 1.: The cropping configuration does both, cropping and wrapping. (Try "Fit Node Size" as "Size" and "Cropping" as "Configuration".)
Re 2.: You can use a trick to get arbitrary label sizes:
1. Create a simple rectangular node (first template from section "Shape Nodes"). Set the width and height of the node to the desired value.
2. Change the "Size" property of the node's default label to "Fit Node Size".
3. Change the "Configuration" property of the node's default label to "Cropping".
4. Move your labeled node over another node.
5. Right-click the labeled node to open its context menu and choose "Convert to Label".
Great! Thank you :)
Your comment on this answer:
Email me at this address if a comment is added after mine:Email me if a comment is added after mine
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
[captcha placeholder]
To avoid this verification in future, please log in or register.
I propose two things:
1. stop calling it 'cropping' in yEd - it's called 'wrapping', cropping means leaving something out.
2. introduce arbitrary label-sizes rather than bind it to the node-size.