Skip to content

Commit

Permalink
Layout of other judges scores is good
Browse files Browse the repository at this point in the history
Switched to a monospaced font to ensure that the columns line up.

Issue #1129
  • Loading branch information
jpschewe committed Jan 4, 2025
1 parent a8e563d commit e1b6d4d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/main/web/subjective/subjective-ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -819,8 +819,6 @@ function populateScoreSummary() {
if (subjective_module.isScoreCompleted(otherScore)) {
const otherComputedScore = subjective_module.computeScore(otherScore);
teamOtherJudgeScores.set(otherJudgeId, `${otherComputedScore} 1`);
} else {
teamOtherJudgeScores.set(otherJudgeId, " ");
}
}
}
Expand Down Expand Up @@ -959,11 +957,13 @@ function populateScoreSummary() {
const otherScoreBlock = document.createElement("span");
rightBlock.appendChild(otherScoreBlock);

const otherJudgeIdLength = otherJudgeId.length;
const otherScoreText = teamOtherJudgeScores.get(otherJudgeId);
if (otherScoreText) {
otherScoreBlock.innerHTML = centerText(otherScoreText, otherJudgeId.length);
otherScoreBlock.innerHTML = centerText(otherScoreText, otherJudgeIdLength);
} else {
otherScoreBlock.innerHTML = " ".repeat(otherJudgeId.length);
const str = " ".repeat(otherJudgeIdLength);
otherScoreBlock.innerHTML = str;
}
otherScoreBlock.classList.add("score-summary-right-elements");
otherScoreBlock.classList.add("other-judge");
Expand Down
8 changes: 7 additions & 1 deletion src/main/web/subjective/subjective.css
Original file line number Diff line number Diff line change
Expand Up @@ -171,5 +171,11 @@ footer button {

#enter-score-note-button {
background-color: purple;
color: white;
color: white;
}

/* make sure the other judge columns line up */
.other-judge {
font-family: monospace;
font-size: larger;
}

0 comments on commit e1b6d4d

Please sign in to comment.