(fromLine: number, toLine: number, depth: number)
| 448 | * sweep 0 runs anticlockwise, which passes left going DOWN and right going up. |
| 449 | */ |
| 450 | export function arcPath(fromLine: number, toLine: number, depth: number): string { |
| 451 | const y0 = lineCentre(fromLine); |
| 452 | const y1 = lineCentre(toLine); |
| 453 | const ry = Math.max(1, Math.abs(y1 - y0) / 2); |
| 454 | const sweep = y1 > y0 ? 0 : 1; |
| 455 | return `M${ARC_COLUMN},${y0} A${depth.toFixed(1)},${ry.toFixed(1)} 0 0 ${sweep} ${ARC_COLUMN},${y1}`; |
| 456 | } |
| 457 | |
| 458 | /** |
| 459 | * The arcs to draw: everything when there are few, otherwise the focused |
no test coverage detected