You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Single-row tooltip vertical centering. When only one of the tooltip rows (Distance or Height) was visible, digit-only labels (e.g. 10.1 km, 79 m) sat too low inside the rect, leaving more whitespace above than below. The cause was Chrome/Safari reporting an SVG <text> bbox that reaches the font's descent extent below the baseline even for glyphs with no descenders, combined with a layout formula that assumed bbox.height equalled the distance from glyph top to baseline. Each tooltip row is now positioned by its visual bbox top, so the 0.5em padding above and below the visible glyphs is symmetric regardless of glyph composition.
Internal
New pure helper computeTooltipLayout in geometry/tooltip-layout.ts. Both view.ts (frontend) and chart.tsx (editor preview) now call it, replacing the previously duplicated layout formulas.
TextMeasurement carries a new topOffset field (signed offset from the text's baseline to its bbox top) so callers can position SVG <text> by its visual bounds.