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:
parent
b660b1582c
commit
64d770ebea
1 changed files with 1 additions and 1 deletions
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue