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.

Categories

Label cleared after applying template property

0 votes
When I map my custom property to template (single or multiple), the existing label text is cleared.

Is this a feature or a bug?
in Help by
recategorized by

1 Answer

0 votes
 
Best answer
This is the intended behavior. (If your template has a label with text, the template's text is adopted as well.)

If you want to change a node's type while still keeping its label text, select the node to change, right-click the desired type in the palette, and choose "Apply" or "Apply Type".
by [yWorks] (151k points)
Alas, me and my team was trying to create nodes, set label and some meta on the node and then use property mapper to change the visualization.
I was hoping to separate the concerns of data and appearance by keeping all appearance attribute in config.
I see. Instead of setting a label text right after creating the node, create a custom property of type "Text" and set its value to the desired label text. With the text in a property, you can add a label text mapping to your properties mapper configuration in addition to the template mapping. This way the properties mapper will change the visualization and right after that update the label text according to your needs.
Hello,

I have exactly the same issue, and I do confess that I don't understand why resetting the label during a template mapping is desired functionality.

Is it not possible to distinguish between the following two cases?

1. the template has no label (NULL) -> so don't change it and
2. the template has an empty label ("") -> so reset it


Thanks very much I really appreciate the free yEd editor - fantstic work!
Unfortunately, no, it is not possible to distinguish between those two cases because a node style always has at least one label (which by default has empty text).
Legal Disclosure | Privacy Policy
...