summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMischa Untaga <99098079+MischaU8@users.noreply.github.com>2023-11-23 07:02:57 +0100
committerMischa Untaga <99098079+MischaU8@users.noreply.github.com>2023-11-23 07:02:57 +0100
commit5cffb3cbb60a9d2cca8a871af206a1e06cacf746 (patch)
tree0f937f2b7d756bd4992a3e1efb40e5579ddf44d2
parentbf549eb216df269733cdb2372c61d466203ca636 (diff)
downloadvotes-for-women-5cffb3cbb60a9d2cca8a871af206a1e06cacf746.tar.gz
show selected us states
-rw-r--r--play.html9
-rw-r--r--play.js1
2 files changed, 10 insertions, 0 deletions
diff --git a/play.html b/play.html
index 80e137d..992351a 100644
--- a/play.html
+++ b/play.html
@@ -130,6 +130,11 @@ path.state.action {
stroke-width: 20;
}
+path.state.selected {
+ stroke: yellow;
+ stroke-width: 20;
+}
+
path.state:hover {
fill: white;
}
@@ -150,6 +155,10 @@ div.state.action {
border-color: white;
}
+div.state.selected {
+ border-color: yellow;
+}
+
div.state:hover {
background-color: #fff8;
}
diff --git a/play.js b/play.js
index b9eb5d3..478335b 100644
--- a/play.js
+++ b/play.js
@@ -709,6 +709,7 @@ function on_update() { // eslint-disable-line no-unused-vars
ui.pieces.appendChild(e)
}
}
+ ui.us_states[i].classList.toggle("selected", i === view.selected_us_state)
}
// remove remaining unused cubes & checks & xs from DOM