Skip to content

Commit

Permalink
Do not set bend points on elk edge
Browse files Browse the repository at this point in the history
when transforming from Sprotty edge

Signed-off-by: Jan Bicker <[email protected]>
  • Loading branch information
jbicker committed Feb 21, 2024
1 parent a0bbb68 commit be224f8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/sprotty-elk/src/elk-layout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,10 @@ export class ElkLayoutEngine implements IModelLayoutEngine {
points.push(elkEdge.targetPoint);
}
}
// if x or y of first and last point are equal then use only them and leave the middle points
if (points.length > 1 && (points[0].x === points[points.length - 1].x || points[0].y === points[points.length - 1].y)) {
points.splice(1, points.length - 2);
}
sedge.routingPoints = points;

if (elkEdge.labels) {
Expand Down

0 comments on commit be224f8

Please sign in to comment.