diff options
author | tkimia <tkimia@purdue.edu> | 2014-04-06 18:45:41 -0400 |
---|---|---|
committer | tkimia <tkimia@purdue.edu> | 2014-04-06 18:45:41 -0400 |
commit | f85943114dba527a1f87abb03229553472f57c0c (patch) | |
tree | 9ae44c21a26ef739b793ef9777e702de58b1bad1 /app/controllers | |
parent | b186c3b1154d1444af0b09f3431ebdb0b2ccc54e (diff) |
started SVG generation
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/matches_controller.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/controllers/matches_controller.rb b/app/controllers/matches_controller.rb index 31fc9ad..e773667 100644 --- a/app/controllers/matches_controller.rb +++ b/app/controllers/matches_controller.rb @@ -8,6 +8,10 @@ class MatchesController < ApplicationController def index @matches = @tournament.matches + # width of SVG + @width = 300 * (Math.log2(@matches.count).floor + 1) + 300; + # height of SVG + @height = 200 * 2**Math.log2(@matches.count).floor + 100; end def get_riot_info |