Welcome to yEd Q&A!
Here you can ask questions and receive answers from other members of the community and yEd developers. And you can tell us your most wanted feature requests.


Can I make "Fit Node to Label" take account of all labels of a node?

0 votes
I have a node with two labels. The primary label is short plain text, and its Visible checkbox is cleared. The second label is HTML-formatted text including  < br /> tags to split it into several lines.

When I use "Fit Node to Label", only the size of the invisible primary label seems to be used. So the visible second label is not contained within the boundary of the node. The second label has Placement="Internal: Center", Size="Fit Content", Configuration="Standard", Alignment="Center".

You may wonder why I need the hidden primary label. It's because this is the text that the Structure View uses when listing the node in its Graph tree. If I don't have the simple primary label the Structure View tree is hard to read because of all the uninterpreted HTML markup that displays there.
in Help by (350 points)

1 Answer

0 votes

Tools > Fit Node to Label only considers the first label of a node (see also the answer to this question).

Regarding your workaround using the invisible label, you could also place that text into the Description (cf. Data tab/section of the node properties) of your nodes and tell the Structure View to display the Description instead of the Text (of the node's first label).

by [yWorks] (23.7k points)
Where is the setting to tell the Structure View to display the Description instead of the Text? This might solve my problem, but I hope you strip HTML markup from the Description when you use it for the Structure View node names. I already set Description, and I use HTML markup in the field because this is rendered correctly when Description is used for the datatip as I hover over the node.
In the Structure View panel there is a combo box at the top that you can use to display the Description instead of the Text (the node's first label).
HTML markup in the Description, however, is shown the same as HTML markup in the label text, i.e. verbatim, not rendered.
Legal Disclosure | Privacy Policy