summaryrefslogtreecommitdiff
path: root/play.js
diff options
context:
space:
mode:
Diffstat (limited to 'play.js')
-rw-r--r--play.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/play.js b/play.js
index 069fa43..0d5845e 100644
--- a/play.js
+++ b/play.js
@@ -77,6 +77,9 @@ let ui = {
zones: [],
units: [],
units_holder: document.getElementById("units"),
+ fln_supply_panel: document.getElementById("fln_supply_panel"),
+ gov_supply_panel: document.getElementById("gov_supply_panel"),
+ eliminated_panel: document.getElementById("eliminated_panel"),
fln_supply: document.getElementById("fln_supply"),
gov_supply: document.getElementById("gov_supply"),
eliminated: document.getElementById("eliminated"),
@@ -465,6 +468,11 @@ function update_map() {
}
}
+ // Hide supply panels when empty
+ ui.fln_supply_panel.classList.toggle("hide", !(ui.fln_supply.childNodes.length - 1))
+ ui.gov_supply_panel.classList.toggle("hide", !(ui.gov_supply.childNodes.length - 1))
+ ui.eliminated_panel.classList.toggle("hide", !(ui.eliminated.childNodes.length - 1))
+
for (let i = 0; i < ui.areas.length; ++i) {
let e = ui.areas[i]
if (e) {