Skip to content

Commit

Permalink
Merge pull request #396 from rollerderby/lead-p2
Browse files Browse the repository at this point in the history
Don't show jammers when clocks aren't running.
  • Loading branch information
frank-weinberg authored Nov 26, 2019
2 parents d483c46 + 0f3f6aa commit a58a72f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions html/views/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,17 @@ function jammer(k, v) {
var inJam = isTrue(WS.state["ScoreBoard.InJam"]);

if (jammerName == null || jammerName == "") {
jammerName = (leadJammer && inJam) ? "Lead" : "";
jammerName = leadJammer ? "Lead" : "";
if (pivotName == null)
pivotName = "";
}

var jn = !starPass ? jammerName : pivotName;
if (!inJam) {
jn = ""; // When no clocks are running, do not show jammer names.
};
$(".Team" + id + " .Lead").toggleClass("HasLead", (leadJammer && !starPass));
$(".Team" + id).toggleClass("HasJammerName", (jn != "" && jn != null));
$(".Team" + id).toggleClass("HasJammerName", (jn != ""));
return jn
}

Expand Down

0 comments on commit a58a72f

Please sign in to comment.