From a1fa1447fd6ffd11c11c8e5f3abf68faabec24b7 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Tue, 31 May 2022 12:11:07 +0200 Subject: Clamp VP tracker to stay on the VP track... --- play.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/play.js b/play.js index 51f4122..693c177 100644 --- a/play.js +++ b/play.js @@ -1373,10 +1373,14 @@ function update_map() { } let vpm = document.getElementById("vp_marker"); - if (view.vp > 10) + if (view.vp > 20) + vpm.className = VP10_MARKER + "french_vp_10"; + else if (view.vp > 10) vpm.className = VP10_MARKER + "french_vp_" + (view.vp-10); else if (view.vp > 0) vpm.className = VP_MARKER + "french_vp_" + view.vp; + else if (view.vp < -20) + vpm.className = VP10_MARKER + "flip british_vp_10"; else if (view.vp < -10) vpm.className = VP10_MARKER + "flip british_vp_" + (-(view.vp+10)); else if (view.vp < 0) -- cgit v1.2.3