protected createVisual(
context: IRenderContext,
edge: IEdge
): CustomEdgeStyleVisual {
const generalPath = super.getPath(edge)!
const croppedGeneralPath = super.cropPath(
edge,
new Arrow(ArrowType.NONE),
new Arrow(ArrowType.NONE),
generalPath
)!
const widePath = croppedGeneralPath.createSvgPath()
widePath.setAttribute('fill', 'none')
widePath.setAttribute('stroke', 'black')
widePath.setAttribute('stroke-width', '4')
const thinPath = croppedGeneralPath.createSvgPath()
thinPath.setAttribute('fill', 'none')
thinPath.setAttribute('stroke', 'white')
thinPath.setAttribute('stroke-width', '2')
const group = document.createElementNS('http://www.w3.org/2000/svg', 'g')
group.append(widePath, thinPath)
return SvgVisual.from(group, { generalPath })