Skip to content

Conversation

uruuru
Copy link
Contributor

@uruuru uruuru commented Sep 10, 2020

Previously, due to the way Direction#isHorizontal() and Direction#isVertically() are implemented (simply ignoring UNDEFINED), an undefined layout direction resulted in a horizontal stacking of labels: left-to-right.
As I feel vertically stacking is the more natural choice, I changed the behavior for undefined.

Note that for layered the direction is always right (internally during node label placement). For other layouters it can happen though that the direction is undefined as they do not support the option at all.
That being said, I tend to suggest to use a different layout option to decide on the stacking dimension than the layout direction.

image

@uruuru uruuru added the alg Affects a non-specific part of ELK's algorithms. label Sep 10, 2020
@uruuru uruuru added this to the Release 0.8.0 milestone Sep 10, 2020
@uruuru uruuru self-assigned this Sep 10, 2020
@le-cds
Copy link
Contributor

le-cds commented Sep 16, 2020

The underlying issue is that undefined values are unfortunate, something that #10 already tracks. But yes, until that is solved this seems sensible.

@le-cds le-cds merged commit c2906eb into master Sep 16, 2020
@le-cds le-cds deleted the uru/defaultLabelStacking branch September 16, 2020 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
alg Affects a non-specific part of ELK's algorithms.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants