protected getBounds(context: ICanvasContext, edge: IEdge): Rect {
const path = super.getPath(edge)!
const thickness = this.distance + 2
const edgeBounds = path.getBounds().getEnlarged(thickness * 0.5)
const circleBounds = Rect.fromCenter(
path.getPoint(0.5),
new Size(circleRadius * 2, circleRadius * 2)
)
return Rect.add(edgeBounds, circleBounds)
}