-
{{ index }}
+
+
{{ index+1 }}
{{ players[playerId].username }}
{{ players[playerId].kills }}
{{ players[playerId].deaths }}
-
{{ Math.round(players[playerId].kills / players[playerId].deaths * 100) / 100 }}
+
{{ Math.round(players[playerId].kills / Math.max(1, players[playerId].deaths) * 100) / 100 }}
{{ players[playerId].max_kill_distance }}
{{ Math.round(players[playerId].avg_kill_distance * 100) / 100 }}
@@ -81,8 +85,8 @@ export default defineComponent({
}
let varA, varB
if (arg === 'k/d') {
- varA = this.players[a].kills / this.players[a].deaths
- varB = this.players[b].kills / this.players[b].deaths
+ varA = this.players[a].kills / Math.max(1, this.players[a].deaths)
+ varB = this.players[b].kills / Math.max(1, this.players[b].deaths)
} else {
varA = this.players[a][arg]
varB = this.players[b][arg]
@@ -145,20 +149,22 @@ export default defineComponent({
margin: 0;
/* border: 2px solid transparent; */
transition: border .25s;
- height:2em;
-}
-.playerHeaders{
- position:sticky;
- top:0;
- height:3em;
+ height: 2em;
}
-.playerHeaders>span{
- padding:.5em .8em 0 .25em;
+.playerHeaders {
+ position: sticky;
+ top: 0;
+ height: 3em;
}
+
+.playerHeaders>span {
+ padding: .5em .8em 0 .25em;
+}
+
.playerRow>div {
- padding:.5em .8em 0 .25em;
- overflow:hidden;
+ padding: .5em .8em 0 .25em;
+ overflow: hidden;
}
.playerHeaders,
@@ -181,17 +187,22 @@ export default defineComponent({
}
.playerHeaders>span:last-child {
- width:100%;
+ width: 100%;
}
@media only screen and (max-width: 600px) {
- .playerRow>div:nth-child(6), .playerHeaders>span:nth-child(6),.playerRow>div:nth-child(7), .playerHeaders>span:nth-child(7) {
- display: none;
+
+ .playerRow>div:nth-child(6),
+ .playerHeaders>span:nth-child(6),
+ .playerRow>div:nth-child(7),
+ .playerHeaders>span:nth-child(7) {
+ display: none;
}
+
.playerRow,
-.playerHeaders{
- grid-template-columns: 4ch 20ch 6ch 6ch 1fr;
-}
+ .playerHeaders {
+ grid-template-columns: 4ch 20ch 6ch 6ch 1fr;
+ }
}
.player span {
@@ -200,6 +211,4 @@ export default defineComponent({
.selected {
background: var(--comment) !important;
-}
-
-
+}