Skip to content

Commit a1ea3ec

Browse files
committed
fix javascript comment formatting. add outrageous hack for someone who wanted to see their 3rd-base saturation speed
1 parent 11fc1e0 commit a1ea3ec

File tree

3 files changed

+38
-8
lines changed

3 files changed

+38
-8
lines changed

app/assets/javascripts/angular/directives/account.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,13 @@ gg.directive('uaccount', ['Account', function(Account) {
3939
alert("Sorry, your matches could not be deleted for some reason. Please contact [email protected] and we will beat the person responsible.");
4040
}
4141

42-
# next steps through the code:
43-
#
44-
# ggtracker: app/controllers/accounts_controller.rb destroy_all_matches
45-
# gg: lib/esdb/identity.rb destroy_all_matches
46-
# esdb: esdb/api/identities.rb post ':id/destroy_all_matches'
47-
# esdb: esdb/jobs/sc2/identity/delete_all_matches.rb
48-
# esdb: esdb/games/sc2/identity.rb destroy_all_matches!
42+
// next steps through the code:
43+
//
44+
// ggtracker: app/controllers/accounts_controller.rb destroy_all_matches
45+
// gg: lib/esdb/identity.rb destroy_all_matches
46+
// esdb: esdb/api/identities.rb post ':id/destroy_all_matches'
47+
// esdb: esdb/jobs/sc2/identity/delete_all_matches.rb
48+
// esdb: esdb/games/sc2/identity.rb destroy_all_matches!
4949
});
5050
}
5151
}
@@ -63,7 +63,7 @@ gg.directive('uaccount', ['Account', function(Account) {
6363
// instantiation should also be moved away..)
6464
account = new Account({id: scope.account.id, account: scope.account});
6565

66-
// Note: there was a way to bind this in the resource, but @id doesn#t
66+
// Note: there was a way to bind this in the resource, but @id doesnt
6767
// work anymore.. figure out what they changed it to.
6868
account.$save({id: account.id});
6969

app/assets/javascripts/angular/directives/matches.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,10 @@ gg.directive('matches', ['Match', function(Match) {
126126
'saturation_skill(avg:[<'+iid+'])',
127127
'sat_1_skill(avg:[<'+iid+'])',
128128
'sat_2_skill(avg:[<'+iid+'])',
129+
'sat_3_skill(avg:[<'+iid+'])',
129130
'sat_1_skill(mavg:[<'+iid+'])',
130131
'sat_2_skill(mavg:[<'+iid+'])',
132+
'sat_3_skill(mavg:[<'+iid+'])',
131133
'win(mavg:[<'+iid+'])',
132134
'win(count:[<'+iid+'])',
133135
'loss(count:[<'+iid+'])',

app/views/players/show.html.erb

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,8 @@
111111
<span class="statdescrip">recently</span>
112112
</p>
113113
</div></div>
114+
115+
<% if !([22, 99055].include?(@identity.id)) %>
114116
<div class="chart-wrap">
115117
<areachart id="spendingchart" classes="chart-spending-trend"
116118
data-values="matches.stats.spending_skill.mavg.as_identity_<%= @identity.id %>"
@@ -130,6 +132,7 @@
130132
<span class="statdescrip spendingskill">recently</span>
131133
</p>
132134
</div>
135+
<% end %>
133136

134137
<div class="sat-speed">
135138
<div class="chart-wrap">
@@ -175,6 +178,31 @@
175178
</div>
176179
</div>
177180

181+
182+
<% if [22, 99055].include?(@identity.id) %>
183+
<div class="sat-speed">
184+
<div class="chart-wrap">
185+
<areachart id="sat3chart" classes="chart-sat3-trend"
186+
data-values="matches.stats.sat_3_skill.mavg.as_identity_<%= @identity.id %>"
187+
data-name="3nd base saturation speed"
188+
data-help="The history of <%= @identity.name %>'s 10-game average 3nd Base Saturation Speed."
189+
data-resolution="resolution"
190+
data-cursor="cursor"
191+
data-areafill="'#E76993'"
192+
data-arealine="'#B25071'"
193+
mti="'auto'"
194+
playername="'<%= @identity.name %>'"
195+
></areachart>
196+
<p class="chartleague">
197+
<league class="chartleague first" data-league="{{ matches.stats.sat_3_skill.avg.as_identity_<%= @identity.id %> }}" data-size="small"></league>
198+
<span class="statdescrip spendingskill first">3rd base sat speed</span>
199+
<league class="chartleague" data-league="{{ matches.stats.sat_3_skill.mavg.as_identity_<%= @identity.id %>.slice(-1)[0] }}" data-size="small"></league>
200+
<span class="statdescrip spendingskill">recently</span>
201+
</p>
202+
</div>
203+
</div>
204+
<% end %>
205+
178206
<div class="apm-trend">
179207
<div class="chart-wrap">
180208
<areachart id="apmchart" classes="chart-apm-trend"

0 commit comments

Comments
 (0)