Fix wheel rendering angles to full circle

This commit is contained in:
Jannik committed 2026-08-26 01:30:12 +02:00
1 parent 353c5d83c4
commit ad677e8aad
2 files changed
+14 -16

No files matched your search

+3 -5
View File
@@ -58,11 +58,9 @@ function buildWheel(svgId, viewBoxSize, currentKey = null, compatIdxs = { primar
const rOut = isMajor ? rOuter : rMid;
const rIn = isMajor ? rMid : rInner;
// -7.5 to align 12B/12A so the center of the segment is at 0 degrees (top)
// The previous implementation had them start at 0, putting the segment from 0 to 15.
// We want the text to be at 0, so the segment goes from -7.5 to +7.5.
const a1 = window.codeToAngle[c] - 7.5;
const a2 = a1 + 15;
// -15 to align 12B/12A so the center of the segment is at 0 degrees (top)
const a1 = window.codeToAngle[c] - 15;
const a2 = a1 + 30;
const aMid = (a1 + a2) / 2;
const [x1,y1] = p(rOut, a1);