windkarte: Rechtskräftig default hidden, remove Entwurf-2-voraussichtlich, 2km/5km rings on by default
Deploy / verify (push) Successful in 58s
Deploy / deploy (push) Successful in 1m6s

- Hide status badge for rechtskraeftig in WindAreaPanel
- Default hiddenStatuses=["rechtskraeftig"] so polygons start hidden
- Fix: call restyleAll after geojsonLayer init so initial hidden state applies
- Default hiddenRings=[] so 2km+5km buffer rings show on selection
- Remove entwurf_2_voraussichtlich from legend
- Lower maxZoom 12→11 for more context on feature select

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Peter Meier
2026-05-18 09:26:19 +02:00
parent 4a72142555
commit cd362fb811
3 changed files with 10 additions and 9 deletions
+1 -1
View File
@@ -54,7 +54,7 @@
<div class="min-w-0">
<div class="flex items-center gap-2 flex-wrap">
<span class="text-xl font-semibold text-stein-800">{area.gebiets_nr}</span>
{#if area.status}
{#if area.status && area.status !== 'rechtskraeftig'}
<span class="rounded-full px-2 py-0.5 text-xs font-medium {STATUS_CLASS[area.status] ?? 'bg-stein-100 text-stein-600'}">
{t(STATUS_KEY[area.status] ?? area.status)}
</span>
+5 -3
View File
@@ -9,7 +9,7 @@
onready = null,
initialGebietsNr = null,
hiddenStatuses = [],
hiddenRings = ["2km", "5km"],
hiddenRings = [],
}: {
areas: WindArea[];
onselect: (area: WindArea | null, center: [number, number] | null) => void;
@@ -52,7 +52,7 @@
let selectedSlug = $state<string | null>(null);
let geojsonLayer: import("leaflet").GeoJSON | null = null;
let buffering = $state(false);
let _hiddenRings: string[] = ["2km", "5km"];
let _hiddenRings: string[] = [];
$effect(() => {
_hiddenRings = hiddenRings;
@@ -164,7 +164,7 @@
map!.fitBounds((layer as import("leaflet").Polygon).getBounds(), {
paddingTopLeft: [40, 40],
paddingBottomRight: [desktop ? 320 : 40, desktop ? 40 : 300],
maxZoom: 12,
maxZoom: 11,
});
}
}
@@ -278,6 +278,8 @@
},
}).addTo(map);
restyleAll(selectedSlug);
// Labels: show from zoom 13, scale font proportionally with zoom
const syncLabels = () => {
if (!labelLayer || !map) return;
@@ -24,8 +24,8 @@ let areas = $state<WindArea[]>([]);
let mapReady = $state(false);
let initialGebietsNr = $state<string | null>(null);
let resetMap: (() => void) | null = null;
let hiddenStatuses = $state<string[]>([]);
let hiddenRings = $state<string[]>(["2km", "5km"]);
let hiddenStatuses = $state<string[]>(["rechtskraeftig"]);
let hiddenRings = $state<string[]>([]);
let mapActive = $state(false);
function toggleStatus(status: string) {
@@ -171,9 +171,8 @@ let areas = $state<WindArea[]>([]);
<!-- Legend -->
<div class="mt-2 flex flex-wrap gap-x-5 gap-y-1.5 text-xs text-stein-400">
{#each [
{ status: "rechtskraeftig", color: "#2d7a45", label: t(T.windkarte_legend_rechtskraeftig) },
{ status: "entwurf_2", color: "#b08a52", label: t(T.windkarte_legend_entwurf_2) },
{ status: "entwurf_2_voraussichtlich", color: "#d4752a", label: t(T.windkarte_legend_entwurf_2_voraussichtlich) },
{ status: "rechtskraeftig", color: "#2d7a45", label: t(T.windkarte_legend_rechtskraeftig) },
{ status: "entwurf_2", color: "#b08a52", label: t(T.windkarte_legend_entwurf_2) },
] as item}
<button
type="button"