diff options
Diffstat (limited to 'play.js')
-rw-r--r-- | play.js | 33 |
1 files changed, 25 insertions, 8 deletions
@@ -555,14 +555,18 @@ function layout_tst_marker(e, v, top) { function layout_vp_marker() { let x, y - if (view.vp > 21) { view.vp = 21 } - if (view.vp < -21) { view.vp = -21 } + if (view.vp > 21) { + view.vp = 21 + } + if (view.vp < -21) { + view.vp = -21 + } if (view.vp === 0) { y = 2425 + 25 x = 843 + 28 } else if (view.vp === -21) { y = 2424 + 25 - x = 803 + 28 - 651 + x = 803 + 28 - 651 } else if (view.vp === 21) { y = 2424 + 25 x = 883 + 28 + 651 @@ -606,8 +610,7 @@ function layout_inf_markers(cn, one, two, three, v, ctl) { one.className = cn + " v" + 8 two.className = cn + " v" + 8 three.className = cn + " v" + (v - 16) - } - else if (v > 8) { + } else if (v > 8) { one.className = cn + " v" + 8 two.className = cn + " v" + (v - 8) three.className = "hide" @@ -687,8 +690,22 @@ function on_update() { for (let s = 0; s <= last_space; ++s) { const demInfl = view.demInfl[s] const comInfl = view.comInfl[s] - layout_inf_markers("marker demInfl", ui.dem_inf[s], ui.dem_inf2[s], ui.dem_inf3[s], demInfl, demInfl - comInfl >= spaces[s].stability) - layout_inf_markers("marker comInfl", ui.com_inf[s], ui.com_inf2[s], ui.com_inf3[s], comInfl, comInfl - demInfl >= spaces[s].stability) + layout_inf_markers( + "marker demInfl", + ui.dem_inf[s], + ui.dem_inf2[s], + ui.dem_inf3[s], + demInfl, + demInfl - comInfl >= spaces[s].stability + ) + layout_inf_markers( + "marker comInfl", + ui.com_inf[s], + ui.com_inf2[s], + ui.com_inf3[s], + comInfl, + comInfl - demInfl >= spaces[s].stability + ) } // UPDATE COUNTRY MARKERS @@ -734,7 +751,7 @@ function on_update() { ui.discard.replaceChildren() for (let c of view.strategy_discard) ui.discard.appendChild(ui.cards[c]) - if (view.discard) + if (view.discard) document.getElementById("discard_panel").classList.remove("hide") else document.getElementById("discard_panel").classList.add("hide") |