mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-14 06:40:50 +00:00
The two stacked abdomen quadrants sit 14 viewBox units apart, yet each per-dot hit-target was an r=14 transparent circle (Ø=28u), so the targets overlapped by ~14 units. SVG hit-testing resolves to the topmost-painted element rather than the nearest centre, so a tap in the overlap band logged the wrong quadrant — defeating the rotation feature. Replace the overlapping per-dot hit-circles with a single transparent overlay that projects the pointer into viewBox space and resolves it to the nearest site centre (new `nearestSiteAt` helper, constrained to the effective allowed set). Every pixel now maps to its closest site, so full-area routing holds without sub-target dead zones, and the abdomen quadrants can no longer mis-route. Keyboard and assistive-tech users keep a per-site focusable r=6 circle (non-overlapping at this spacing) with the Space/Enter handler and aria-label. Add tests asserting a tap in the former overlap band maps to the nearer quadrant. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> (cherry picked from commit a07988f139b0067e82ccc5ad7e5890e0517fe869)