From b87d6302d36c1bf1f3659a4b7e806b9b0445320e Mon Sep 17 00:00:00 2001 From: user01 Date: Fri, 15 May 2026 18:56:27 +0900 Subject: [PATCH] Make name tooltip permanent and 1.2x larger - Add permanent: true to tooltip (always visible speech bubble) - Add CSS class flag-marker-tooltip with 1.2em font size - Use white-space: nowrap to prevent word wrapping --- index.html | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index 28730d8..25a3d7c 100644 --- a/index.html +++ b/index.html @@ -185,6 +185,7 @@ body { font-family: 'Segoe UI', sans-serif; display: flex; height: 100vh; color: } .help-text { font-size: 12px; color: #718096; margin-top: 6px; } +.flag-marker-tooltip { font-size: 1.2em !important; padding: 6px 12px !important; white-space: nowrap; } @@ -594,7 +595,7 @@ map.on('click', (e) => { const { lat, lng } = e.latlng; const displayNum = flag.number || flags.indexOf(flag) + 1; const marker = L.marker([lat, lng], { icon: makeNumIcon(displayNum), draggable: true }).addTo(map); - if (flag.name) marker.bindTooltip(esc(flag.name), { direction: 'right', offset: [10, 0] }); + if (flag.name) marker.bindTooltip(esc(flag.name), { permanent: true, direction: 'right', offset: [10, 0], className: 'flag-marker-tooltip' }); marker.on('dragend', () => { const p = marker.getLatLng(); flag.lat = p.lat; flag.lng = p.lng; scheduleGeocode(flag); renderList(); @@ -646,7 +647,7 @@ document.getElementById('file-input').addEventListener('change', async (e) => { if (!isNaN(lat) && !isNaN(lng)) { const displayNum = flag.number || flags.indexOf(flag) + 1; const marker = L.marker([lat, lng], { icon: makeNumIcon(displayNum), draggable: true }).addTo(map); - if (flag.name) marker.bindTooltip(esc(flag.name), { direction: 'right', offset: [10, 0] }); + if (flag.name) marker.bindTooltip(esc(flag.name), { permanent: true, direction: 'right', offset: [10, 0], className: 'flag-marker-tooltip' }); marker.on('dragend', () => { const p = marker.getLatLng(); flag.lat = p.lat; flag.lng = p.lng; scheduleGeocode(flag); renderList();