Fix analog positioning

This commit is contained in:
Oleksandr Kozachuk 2025-06-15 11:03:01 +02:00
parent 2c90b77885
commit 3a765e01a8

View File

@ -43,8 +43,8 @@
// Position markers based on the current clock size
// Move markers slightly inward and tweak the center position so
// the ring of ticks lines up perfectly with the border.
const borderOffset = clock.offsetWidth > 300 ? 35 : 25;
const centerAdjust = { x: -1, y: -1 };
const borderOffset = clock.offsetWidth > 300 ? 45 : 26;
const centerAdjust = { x: -3, y: -2 };
const markerRadius = clock.offsetWidth / 2 - borderOffset;
markers.forEach((m, i) => {
const angle = (i / 16) * 2 * Math.PI;