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

How to Customize automatic layout ?

0 votes

Hi,

I use yEd to make directed tree graphs that are programming algorithms.

To do so, I use the directed tree automatic layout which do a pretty good job.

GCD

But I also need to add Anotations that do not follow the directed tree rules, they must stay at same level and right of the reference box.

gcd + note

Is it possible to cutomize the actual automatic layout (by myself) ? is there an API ?

I guess Java is the programming language.

in Feature Requests by (390 points)

2 Answers

+1 vote

You can get pretty close to the results you want if you let the directed tree layout work normally.  For an annotation to be placed to the right of a reference box (node), it must be at the same level in the graph hierarchy.  So the directed edge must be from the parent of the reference node, not from the reference node itself.  If you create an annotation node with a false left-edge connector, it will still look like it's attached to the reference node to its left, even though the true edge is from the parent node.  The parent-to-annotation edge can be coloured white to hide it on the graph.  For an annotation at the top node where there is no parent node, simply create an invisible (no border or fill colour) as a new parent node.  See the attached Annotations graphml file for an example of the annotation node and the graph using this method.  Understand that this is a workaround, and that the annotation is not actually attached to the reference node, so the position of the annotation is not guaranteed.  If an annotation is out of place, just move it to the right of its reference node and run the directed tree layout again.

by
0 votes

Unfortunately, it is not possible to customize the behavior of layout algorithms beyond the displayed settings in yEd.

If you need custom layout algorithms, you have to develop your own application based on the yFiles for Java programming library (or its HTML5 and .NET counterparts if you prefer those platforms over Java). The aforementioned libraries may be evaluated free-of-charge for 30 days. Please visit the yWorks website for further information.

by [yWorks] (161k points)
I think that allowing custom or new modules to plugin in yEd would be a good thing.
Selling the DSK with your libraries would leverage their value by offering the possibility to integrate custom modules with yEd.
Legal Disclosure | Privacy Policy
...