in src/visual.ts [917:937]
private getPathWithArrow(link: ForceGraphLink): string {
let dx: number = link.target.x - link.source.x,
dy: number = link.target.y - link.source.y,
dr: number = Math.sqrt(dx * dx + dy * dy),
theta: number = Math.atan2(dy, dx) + Math.PI / 7.85,
d90: number = Math.PI / 2,
dtxs: number = link.target.x - 6 * Math.cos(theta),
dtys: number = link.target.y - 6 * Math.sin(theta);
if (dr === 0) {
return `M ${link.source.x - 10} ${link.source.y - 10} C ${link.source.x - 50} ${link.source.y - 50}, ${link.source.x + 50} ${link.source.y - 50}, ${link.source.x + 10} ${link.source.y - 10}`;
}
return "M" + link.source.x + "," + link.source.y
+ "A" + dr + "," + dr + " 0 0 1," + link.target.x + "," + link.target.y
+ "A" + dr + "," + dr + " 0 0 0," + link.source.x + "," + link.source.y
+ "M" + dtxs + "," + dtys
+ "l" + (3.5 * Math.cos(d90 - theta) - 10 * Math.cos(theta)) + "," + (-3.5 * Math.sin(d90 - theta) - 10 * Math.sin(theta))
+ "L" + (dtxs - 3.5 * Math.cos(d90 - theta) - 10 * Math.cos(theta)) + "," + (dtys + 3.5 * Math.sin(d90 - theta) - 10 * Math.sin(theta))
+ "z";
}