Skip to content

Commit

Permalink
Render junction points group only if junction points are present
Browse files Browse the repository at this point in the history
Signed-off-by: Guillaume Fontorbe <guillaume.fontorbe@typefox.io>
  • Loading branch information
gfontorbe committed Feb 21, 2024
1 parent ed4d63e commit e5458b6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/sprotty/src/graph/views.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,11 @@ export class PolylineEdgeView extends RoutableView {
junctionPoints.push(<circle cx={route[i].x} cy={route[i].y} r={5} class-sprotty-junction={true}/>);
}
}
return <g>{junctionPoints}</g>;
if (junctionPoints.length > 0) {
return <g>{junctionPoints}</g>;
}

return undefined;
}

protected renderLine(edge: SEdgeImpl, segments: Point[], context: RenderingContext, args?: IViewArgs): VNode {
Expand Down

0 comments on commit e5458b6

Please sign in to comment.