-
Notifications
You must be signed in to change notification settings - Fork 92
Inline edge labels on self-loops with opposing sides. #1158
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
Inline edge labels on self-loops with opposing sides. #1158
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements inline edge labels for self-loops that span opposing sides of a node. The changes enable proper routing and placement of edge labels that should be positioned directly on the edge path rather than offset from it.
Key changes:
- Added inline label detection and handling in the orthogonal self-loop router
- Modified bend point calculation to accommodate inline label dimensions
- Updated label placement logic to support inline positioning for opposing-side loops
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| OrthogonalSelfLoopRouter.java | Adds inline label detection, removes edge distance for inline labels, and adjusts bend points to reserve space for inline labels |
| LabelPlacer.java | Updates label assignment logic to handle inline labels for opposing-side loops and removes inline property for invalid cases |
| SelfLoopEdge.java | Adds utility methods to check for inline labels and get label sides |
Comments suppressed due to low confidence (2)
plugins/org.eclipse.elk.alg.layered/src/org/eclipse/elk/alg/layered/intermediate/loops/routing/OrthogonalSelfLoopRouter.java:381
- The variable name 'labelSides' is misleading as it represents a single PortSide, not multiple sides. Consider renaming to 'labelSide' for clarity.
PortSide labelSides = slEdge.getLabelSides();
plugins/org.eclipse.elk.alg.layered/src/org/eclipse/elk/alg/layered/intermediate/loops/SelfLoopEdge.java:98
- The method name 'getLabelSides' suggests it returns multiple sides, but it returns a single PortSide. Consider renaming to 'getLabelSide' for accuracy.
public PortSide getLabelSides() {
Fixes #659
Fixes #1023