mirror of
https://github.com/Luchexx/wacrm.git
synced 2026-11-02 17:29:45 +00:00
Hover was off by ~one letterbox width on wide layouts — users had to drag the cursor far right of the last data point to see its tooltip. Root cause: the SVG uses a fixed 760×240 viewBox with preserveAspect- Ratio's default "xMidYMid meet", which centers the content and leaves empty letterbox bars on either side when the container is wider than the viewBox aspect. The old hover math mapped clientX linearly onto the full SVG DOM rect, so every pixel of letterbox shifted the snap further from the real data point. Switched to SVGSVGElement.getScreenCTM().inverse() to map screen coords back to viewBox units correctly regardless of letterboxing, scaling, or future transforms. The tooltip's horizontal offset also now comes from the same CTM (mapping the snapped data point's viewBox x back to a pixel offset inside the wrapper div), so the tooltip and crosshair line up exactly on top of each other. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| activity-feed.tsx | ||
| conversations-chart.tsx | ||
| empty-state.tsx | ||
| metric-card.tsx | ||
| pipeline-donut.tsx | ||
| quick-actions.tsx | ||
| response-time-chart.tsx | ||
| skeleton.tsx | ||