diff --git a/src/stage/SunPathPanel.tsx b/src/stage/SunPathPanel.tsx index 3c93c444..8c68d52e 100644 --- a/src/stage/SunPathPanel.tsx +++ b/src/stage/SunPathPanel.tsx @@ -41,6 +41,7 @@ interface Props { export function SunPathPanel(props: Props) { const [hover, setHover] = createSignal(null); + const [hoverSun, setHoverSun] = createSignal(false); /** A track without a selector reports the frames; it does not choose them. */ const interactive = () => props.onSelect !== undefined; @@ -210,15 +211,25 @@ export function SunPathPanel(props: Props) { }} + {/* The sun: a 20px hit area around a 10px dot, because the dot alone is a hard thing + to point at — and pointing at it is what reveals the readout below. */}
+ class="absolute flex size-5 -translate-x-1/2 -translate-y-1/2 items-center justify-center" + onMouseEnter={() => setHoverSun(true)} + onMouseLeave={() => setHoverSun(false)} + title={`${t("stage.altitude")} ${formatAngle(props.current.altitude)}° · ${t("stage.azimuth")} ${formatAngle(props.current.azimuth)}°`} + > +
+
{/* Horizon label: sits in the empty middle band (the track hangs high here, no path crosses it) */} ))} - - - {props.current.altitude < 0 ? "☾" : "☀"} + {/* Hovering the sun reveals the readout, so it is not a permanent label sitting on + top of the marker it describes. */} + + + + {props.current.altitude < 0 ? "☾" : "☀"} + + + {props.current.altitude.toFixed(1)}° ·{" "} + {props.current.azimuth.toFixed(1)}° + - - {props.current.altitude.toFixed(1)}° ·{" "} - {props.current.azimuth.toFixed(1)}° - - +
);