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 @@