fix(planner): give the note tooltip a fixed width + centered text

Follow-up to #593. With a long note the tooltip still squeezed to ~1 word
wide: an inline-block with only max-width, inside Leaflet's auto-width
tooltip, shrinks to its longest word rather than filling max-width.

Give it an explicit `width: 200` (a consistent, comfortably wide box that
wraps long notes cleanly) and `text-align: center`. Verified live in the
browser against a long repeated note.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Ullrich Schäfer 2026-07-15 21:33:43 +02:00
parent b660b1582c
commit 64d770ebea
No known key found for this signature in database
GPG key ID: A32FF691A0F752D9

View file

@ -218,7 +218,7 @@ export function PlannerMap({ yjs, sessionId, onRouteRequest, highlightPosition,
>
{wp.note && (
<Tooltip direction="top" offset={[0, -14]} opacity={0.95}>
<span style={{ maxWidth: 220, display: "inline-block", whiteSpace: "pre-wrap", overflowWrap: "break-word" }}>
<span style={{ width: 200, display: "inline-block", textAlign: "center", whiteSpace: "pre-wrap", overflowWrap: "break-word" }}>
{wp.note.length > 120 ? wp.note.slice(0, 120) + "…" : wp.note}
</span>
</Tooltip>