Skip to content

Commit

Permalink
remove time dead col on teams
Browse files Browse the repository at this point in the history
replace n/a with '-'
  • Loading branch information
ebshimizu committed Dec 27, 2018
1 parent c198582 commit 431818e
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 9 deletions.
4 changes: 2 additions & 2 deletions js/teams.js
Original file line number Diff line number Diff line change
Expand Up @@ -344,11 +344,11 @@ function loadTeamData(team, matches, heroData) {
elem = $('#team-structure-stats');
updateTeamStat(elem, 'forts-destroyed', teamStats.structures.Fort.destroyed);
updateTeamStat(elem, 'forts-lost', teamStats.structures.Fort.lost);
updateTeamStat(elem, 'first-fort', teamStats.structures.Fort.destroyed === 0 ? 'N/A' : formatSeconds(teamStats.structures.Fort.first / teamStats.structures.Fort.gamesWithFirst));
updateTeamStat(elem, 'first-fort', teamStats.structures.Fort.destroyed === 0 ? '-' : formatSeconds(teamStats.structures.Fort.first / teamStats.structures.Fort.gamesWithFirst));

updateTeamStat(elem, 'keeps-destroyed', teamStats.structures.Keep.destroyed);
updateTeamStat(elem, 'keeps-lost', teamStats.structures.Keep.lost);
updateTeamStat(elem, 'first-keep', teamStats.structures.Keep.destroyed === 0 ? 'N/A' : formatSeconds(teamStats.structures.Keep.first / teamStats.structures.Keep.gamesWithFirst));
updateTeamStat(elem, 'first-keep', teamStats.structures.Keep.destroyed === 0 ? '-' : formatSeconds(teamStats.structures.Keep.first / teamStats.structures.Keep.gamesWithFirst));

updateTeamStat(elem, 'wells-destroyed', teamStats.structures['Fort Well'].destroyed + teamStats.structures['Keep Well'].destroyed);
updateTeamStat(elem, 'wells-lost', teamStats.structures['Fort Well'].lost + teamStats.structures['Keep Well'].lost);
Expand Down
2 changes: 1 addition & 1 deletion js/util/formatters.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function formatSeconds(val) {

function formatStat(field, val, allFixed = false) {
if (Number.isNaN(val))
return "N/A";
return '-';

if (val === undefined)
return 0;
Expand Down
5 changes: 0 additions & 5 deletions js/util/table-defs.js
Original file line number Diff line number Diff line change
Expand Up @@ -506,11 +506,6 @@ const TeamHeroSummaryFormat = {
data: (row) => row.stats.Takedowns / Math.max(1, row.stats.Deaths),
render: (data) => formatStat('KDA', data)
},
{
title: 'Avg. Time Dead',
data: 'stats.TimeSpentDead',
render: (data) => formatStat('Time', data)
},
{
title: 'Avg. % Dead',
data: (row) => row.stats.timeDeadPct / row.games,
Expand Down
1 change: 0 additions & 1 deletion templates/teams-page.html
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ <h1 class="ui inverted header team-name">[Team Name]</h1>
<th class="center aligned stat">D</th>
<th class="center aligned stat">K</th>
<th class="center aligned stat">KDA</th>
<th class="center aligned stat">Avg. Time Dead</th>
<th class="center aligned stat">Avg. % Dead</th>
<th class="center aligned stat">Round 1 Pick %</th>
<th class="center aligned stat">Round 2 Pick %</th>
Expand Down

0 comments on commit 431818e

Please sign in to comment.