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
This commit is contained in:
2026-05-15 18:56:27 +09:00
parent a801274e5f
commit b87d6302d3

View File

@@ -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; }
</style>
</head>
<body>
@@ -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();