Added rank/number of sessions text

This commit is contained in:
Michael Schmatz 2014-04-04 14:55:55 -07:00
parent 0684bcff9c
commit 2411269f2b
2 changed files with 23 additions and 1 deletions

View file

@ -30,4 +30,13 @@
text
fill: #555555
.rank-text
font-size: 15px
fill: #555555
.humans-rank-text
fill: #bf3f3f
.ogres-rank-text
fill: #3f44bf

View file

@ -217,7 +217,20 @@ module.exports = class LadderTabView extends CocoView
.attr("x",1)
.attr("width",3)
.attr("height",height - y(9001))
rankClass = "rank-text"
if teamName.toLowerCase() is "ogres" then rankClass = "rank-text ogres-rank-text"
if teamName.toLowerCase() is "humans" then rankClass = "rank-text humans-rank-text"
message = "#{histogramData.length} players"
if @leaderboards[teamName].session? then message="#{@leaderboards[teamName].myRank}/#{histogramData.length}"
svg.append("g")
.append("text")
.attr("class",rankClass)
.attr("y",0)
.attr("text-anchor","end")
.attr("x",width)
.text(message)
#Translate the x-axis up
svg.append("g")
.attr("class", "x axis")