Added @layout annotation to add arbitrary layout options an elements #1951
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds the @layout annotation to set arbitrary layout option supported by ELK.
All options for the layered algorithm and their corresponding values can be found here together with additional documentation.
I recommend trying out different options in the interactive elk-live editor if questions should arise. Otherwise, feel free to tag me if you have questions.
Layout options can be specified in the following pattern:
@layout(option=<elk-option-id>, value=<elk-option-value>)
E.g. if we want to set a port side, we can use the unique suffix as an option id for port side
.
The id is
org.eclipse.elk.port.side
, henceport.side
will be unique. Depending on the optionside
may also be unique but it this case it collides with other option ids.This should mainly be used for testing out different options, e.g. different layout directions, and for creating drawings for papers and documentation without the hassle of changing the synthesis.