diff options
author | tkimia <tkimia@purdue.edu> | 2014-04-24 18:08:26 -0400 |
---|---|---|
committer | tkimia <tkimia@purdue.edu> | 2014-04-24 18:08:26 -0400 |
commit | bd1bfe729030312fc678a3705c881744aa650c63 (patch) | |
tree | aa63b5ebda40f1c3655d271f5e52f94324730702 | |
parent | 976325f60e7706e480f3d45848897200734c8485 (diff) |
text in graph is a bit better
-rw-r--r-- | app/assets/stylesheets/matches.css.scss | 15 | ||||
-rw-r--r-- | lib/scheduling/elimination.rb | 2 |
2 files changed, 16 insertions, 1 deletions
diff --git a/app/assets/stylesheets/matches.css.scss b/app/assets/stylesheets/matches.css.scss index 66da68e..ee43ab4 100644 --- a/app/assets/stylesheets/matches.css.scss +++ b/app/assets/stylesheets/matches.css.scss @@ -51,4 +51,19 @@ form { color: #333; } +} + +svg { + min-width: 600px; +} + +@media (max-width: 900px) { + svg text { + font-size: 200%; + } +} +@media (max-width: 700px) { + svg text { + font-size: 150%; + } }
\ No newline at end of file diff --git a/lib/scheduling/elimination.rb b/lib/scheduling/elimination.rb index e66a29a..4e368b5 100644 --- a/lib/scheduling/elimination.rb +++ b/lib/scheduling/elimination.rb @@ -108,7 +108,7 @@ STRING t = 1 while t <= numTeams - color = (matches[i].teams[t-1] and matches[i].teams[t-1].users.include?(current_user)) ? "#BCED91" : "white" + color = (matches[i].teams[t-1] and matches[i].teams[t-1].users.include?(current_user)) ? "#5BC0DE" : "white" str += "\t\t<rect width=\"#{rw-5}%\" height=\"#{rh*Float(30)/(matchHeight)}%\" x=\"#{rx + 2.5}%\" y=\"#{ry + (Float(t-1)/numTeams)*rh + 2 }%\" fill=\"#{color}\" />\n" if matches[i].teams[t-1] str += "\t\t<text x=\"#{rx + rw/4}%\" y=\"#{ry + (Float(t-1)/numTeams + Float(30)/(matchHeight))*rh}%\" font-size=\"#{rh}\">Team #{matches[i].teams[t-1].id}</text>\n" |