Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added @layout annotation to add arbitrary layout options an elements #1951

Merged
merged 6 commits into from
Aug 28, 2023

Conversation

soerendomroes
Copy link
Collaborator

@soerendomroes soerendomroes commented Aug 16, 2023

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, hence port.side will be unique. Depending on the option side may also be unique but it this case it collides with other option ids.

target C

reactor test (a:time(1 s)) {
    @layout(option="port.side", value="NORTH")
    output b: time
}

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.

@soerendomroes soerendomroes changed the title First prototype @layout annotation. Added @layout annotation to add arbitrary layout options an elements Aug 16, 2023
@soerendomroes soerendomroes marked this pull request as ready for review August 16, 2023 15:31
Copy link
Collaborator

@cmnrd cmnrd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I think this will be helpful. I'll play around with this and see if it resolves some of the "issues" I had lately.

Could you run ./gradlew spottlessJavaApply to apply the code formatting and commit the changes? I would do it myself, but I don't think I can push to your fork.

@cmnrd cmnrd added diagrams Problems with diagram synthesis enhancement Enhancement of existing feature labels Aug 28, 2023
@cmnrd cmnrd enabled auto-merge August 28, 2023 13:00
@cmnrd cmnrd added this pull request to the merge queue Aug 28, 2023
Merged via the queue into lf-lang:master with commit 9a1587b Aug 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
diagrams Problems with diagram synthesis enhancement Enhancement of existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants