Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
astro committed Jun 23, 2024
1 parent 93712c6 commit 5a5de69
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
13 changes: 13 additions & 0 deletions app.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
body {
margin: 0;
}

#map {
height: 90vh;
}
Expand All @@ -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;
Expand Down
4 changes: 4 additions & 0 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
1 change: 1 addition & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<html>
<head>
<title>Dresden Wahlergebnisse in Wahlbezirken</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="leaflet.css">
<link rel="stylesheet" href="app.css">
<script src="leaflet.js"></script>
Expand Down

0 comments on commit 5a5de69

Please sign in to comment.