-
Notifications
You must be signed in to change notification settings - Fork 83
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
[PR] Convenient spacing configuration #598
Conversation
plugins/org.eclipse.elk.core/src/org/eclipse/elk/core/util/ElkSpacings.java
Show resolved
Hide resolved
Wow, that's quite a bit to take in, thanks for all the effort! I find it hard to really evaluate it without using it, but just from going over the code, it does make sense. Using this also solves our problems with layout option defaults when it comes to spacings, right? |
I'm not sure I know what you mean. |
I'm basically referring to #104. This mechanism applies concrete spacing values to all elements, so that the node and label placement and size code won't have to rely on wrong, non-algorithm-specific default values? |
Sounds like it 😲. I'll see if I can add a test to verify this, though. |
It does - I added a straightforward test. Note however, that the application of concrete spacing values only happens if the We could discuss whether we want to execute this kind of mechanism by default for all options that are used within common layouter code. However, as currently all default values match between core and layered, there's no real need to do so. |
I guess we could defer that to when this really becomes a problem. |
Efforts in the direction of #105.
The new class
ElkSpacings
is intended to be used by layout algorithm-integrators to configure a graph with spacing values before the graph is passed to the layout algorithm itself. It supports the spacing options provided byCoreOptions
.The
LayeredSpacings
class adjusts and extends the functionality ofElkSpacings
by what layered offers in terms of additional spacing options (in particular the between layers options).Furthermore, there's a new layout option in
Layered.melk
:spacing.baseValue
. It can be used to alter the overall "spaciousness" of a drawing. In other words, in can in-/decrease all spacing values. If one desires to fine-tune individual spacing option values, theLayeredSpacings
class would have to be used manually as described forElkSpacings
above.@le-cds I'm interested in your opinion regarding the actual integration into layered's
ElkGraphImporter
(see the code comment for a rationale).Documenting the usage of the new classes as part of the website shall be done as part of #335.