Merge pull request #595 from trails-cool/fix/planner-note-tooltip-adaptive-width

fix(planner): note tooltip sizes to content (max-content, cap 280)
This commit is contained in:
Ullrich Schäfer 2026-07-15 21:48:22 +02:00 committed by GitHub
commit ad9a633ae0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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={{ width: 200, display: "inline-block", textAlign: "center", whiteSpace: "pre-wrap", overflowWrap: "break-word" }}>
<span style={{ width: "max-content", maxWidth: 280, display: "inline-block", textAlign: "center", whiteSpace: "pre-wrap", overflowWrap: "break-word" }}>
{wp.note.length > 120 ? wp.note.slice(0, 120) + "…" : wp.note}
</span>
</Tooltip>