mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-02-17 08:50:58 -05:00
Added rank/number of sessions text
This commit is contained in:
parent
0684bcff9c
commit
2411269f2b
2 changed files with 23 additions and 1 deletions
|
@ -30,4 +30,13 @@
|
|||
text
|
||||
fill: #555555
|
||||
|
||||
.rank-text
|
||||
font-size: 15px
|
||||
fill: #555555
|
||||
|
||||
.humans-rank-text
|
||||
fill: #bf3f3f
|
||||
|
||||
.ogres-rank-text
|
||||
fill: #3f44bf
|
||||
|
|
@ -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")
|
||||
|
|
Loading…
Reference in a new issue