Set marker font size relative to radius
This commit is contained in:
@@ -83,9 +83,10 @@
|
||||
|
||||
const outerR = baseRadius - 2; // just inside the border
|
||||
|
||||
// Distance from center for the marker digits so they sit just inside big ticks
|
||||
// Distance from center so marker's outer edge sits just inside the big tick
|
||||
const markerSize = markers[0] ? markers[0].offsetWidth : 0;
|
||||
const markerRadius = outerR - lenBig - markerSize * getMarkerOffset(clock.offsetWidth);
|
||||
const inset = baseRadius * 0.001; // 0.1% of the radius
|
||||
const markerRadius = outerR - lenBig - inset + markerSize / 2;
|
||||
|
||||
markers.forEach((m, i) => {
|
||||
const angle = (i / 16) * 2 * Math.PI;
|
||||
|
||||
Reference in New Issue
Block a user