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

Positioning of inline labels is off in vertical layout #841

Closed
NiklasRentzCAU opened this issue May 23, 2022 · 2 comments · Fixed by #852
Closed

Positioning of inline labels is off in vertical layout #841

NiklasRentzCAU opened this issue May 23, 2022 · 2 comments · Fixed by #852
Milestone

Comments

@NiklasRentzCAU
Copy link

I assume inline labels to be centered on their parent edge, i.e. the label "i" of the following graph should completely overlay the edge behind it. In reality though the label if offset by 1-2 pixels to the left.

elk.direction: DOWN
node a
node b
edge a -> b {
	label "i" {
		edgeLabels.inline: true
	}
}

Causes issue kieler/KLighD#116

@soerendomroes
Copy link
Contributor

I tried to just add 1 pixel:

It does not always seem to be the case (as seen below) that this fixes the issue.
jette-stpa

But in some models it seems to be correct:

elk.direction: DOWN
considerModelOrder.components: FORCE_MODEL_ORDER
node a
node b
edge a -> b {
  label "i" {
    edgeLabels.inline: true
  }
}

node c
node d
edge c -> d {
  label "w" {
    edgeLabels.inline: true
  }
}

node e
node f
edge e -> f {
  label "i" {
    edgeLabels.inline: true
  }
}

841_inlineEdgeLabels

@soerendomroes
Copy link
Contributor

The issue seems to be the edgeLabel spacing (which is 2.0) per default.

soerendomroes added a commit to soerendomroes/elk that referenced this issue Jul 14, 2022
soerendomroes added a commit that referenced this issue Nov 28, 2022
Signed-off-by: Soeren Domroes <[email protected]>

Signed-off-by: Soeren Domroes <[email protected]>
@soerendomroes soerendomroes added this to the Release 0.9.0 milestone Dec 5, 2023
NiklasRentzCAU added a commit to kieler/semantics that referenced this issue Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants