feat(windkarte): InfoAccordion, anlagen-Hinweis, Tooltip ohne Icons
Deploy / verify (push) Successful in 1m6s
Deploy / deploy (push) Successful in 1m18s

- Disclaimer aus CMS-Feld (hinweis_text) via InfoAccordion statt Hardcode
- info_text-Feld für Block-Fließtext ergänzt
- anlagen_geplant_hinweis-Feld in WindArea + Panel-Anzeige
- Tooltip-Icons entfernt (square-outline/wind-turbine/map-marker inline SVGs)
- Panel: square-outline → ruler-square für Fläche
- Iconify-Subset neu generiert

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Peter Meier
2026-06-11 12:35:29 +02:00
parent 1c63f68c0b
commit 41597f87b5
9 changed files with 146 additions and 33 deletions
+18 -8
View File
@@ -283,20 +283,30 @@
await selectFeature(L, feature, layer, area);
});
// Hover tooltip
// Hover tooltip — labels rendered bold via <strong>, an info glyph
// gets appended after the count when the editor supplied a hint
// string so users know there's more context in the side panel.
const nrLabel = area.gebiets_nr ?? p.name ?? "";
const title = area.bezeichnung
? `${nrLabel} ${area.bezeichnung}`
: nrLabel;
const lines: string[] = [];
if (area.flaeche_ha != null) lines.push(`${t(T.windkarte_label_flaeche)}: ${area.flaeche_ha.toFixed(1)} ha`);
if (area.gemeinden && area.gemeinden.length > 0) {
lines.push(`${t(T.windkarte_label_gemeinden)}: ${area.gemeinden.join(', ')}`);
}
const esc = (s: string) => s.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;');
const row = (label: string, value: string, suffix = "") =>
`<strong>${esc(label)}:</strong> ${esc(value)}${suffix}`;
const lines: string[] = [];
if (area.flaeche_ha != null) {
lines.push(row(t(T.windkarte_label_flaeche), `${area.flaeche_ha.toFixed(1)} ha`));
}
if (area.anlagen_geplant != null) {
const hint = area.anlagen_geplant_hinweis ? " *" : "";
lines.push(row(t(T.windkarte_label_anlagen_geplant), `${area.anlagen_geplant}`, hint));
}
if (area.gemeinden && area.gemeinden.length > 0) {
lines.push(row(t(T.windkarte_label_gemeinden), area.gemeinden.join(', ')));
}
const tooltipHtml =
`<div class="font-semibold">${esc(title)}</div>` +
(lines.length ? `<div class="mt-0.5 text-xs opacity-90">${lines.map(esc).join('<br/>')}</div>` : '');
`<div class="text-sm font-bold pb-1 mb-1 border-b border-stein-200/60">${esc(title)}</div>` +
(lines.length ? `<div class="text-xs opacity-90 leading-relaxed">${lines.join('<br/>')}</div>` : '');
layer.bindTooltip(tooltipHtml, { sticky: true, className: "windkarte-tooltip" });
// Permanent label via divIcon marker at polygon center