From 5a5de69457e9d85cf17e142eafd6a117fd86d27e Mon Sep 17 00:00:00 2001 From: Astro Date: Sun, 23 Jun 2024 22:23:22 +0200 Subject: [PATCH] update --- app.css | 13 +++++++++++++ app.js | 4 ++++ index.html | 1 + 3 files changed, 18 insertions(+) diff --git a/app.css b/app.css index d7e5bfc..4bda05a 100644 --- a/app.css +++ b/app.css @@ -1,3 +1,7 @@ +body { + margin: 0; +} + #map { height: 90vh; } @@ -12,6 +16,15 @@ h3 { margin: 0.5rem 0; } +select { + margin: 0.5rem 1rem; +} + +#parties label { + white-space: nowrap; + margin: 0.5rem 1rem; +} + .party { height: 1.5rem; min-width: 400px; diff --git a/app.js b/app.js index 448c757..db13c3b 100644 --- a/app.js +++ b/app.js @@ -70,6 +70,10 @@ function render() { fetch(curGeojson, { cache: "force-cache" }).then(function(res) { return res.json(); }).then(function(geojson) { + if (curGeojson !== newGeojson) { + return; + } + layer = L.geoJSON(geojson, { style: function(feature) { if (!elections) { diff --git a/index.html b/index.html index a007bbb..0689120 100644 --- a/index.html +++ b/index.html @@ -2,6 +2,7 @@ Dresden Wahlergebnisse in Wahlbezirken +