summaryrefslogtreecommitdiff
path: root/playoff.py
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2017-02-27 14:44:29 +0100
committeremkael <emkael@tlen.pl>2017-02-27 14:44:29 +0100
commita5eb585bc5192268743776db8e4ee24e4fd903ba (patch)
tree5ee2a84de5c99ea2220185af15d1d862de260805 /playoff.py
parent564b630b2699eb57524dd332c3bd4a0f910044ca (diff)
Including dummies in row height calculation
Diffstat (limited to 'playoff.py')
-rw-r--r--playoff.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/playoff.py b/playoff.py
index 3294875..a4da821 100644
--- a/playoff.py
+++ b/playoff.py
@@ -216,7 +216,7 @@ for positions, teams in leaderboard_teams.iteritems():
leaderboard[position-1] = table_team[0]
grid_columns = len(settings['phases'])
-grid_rows = max([len(phase['matches']) for phase in settings['phases']])
+grid_rows = max([len(phase['matches']) + len(phase['dummies']) if 'dummies' in phase else len(phase['matches']) for phase in settings['phases']])
grid_height = grid_rows * (settings['page']['height'] + settings['page']['margin']) - settings['page']['margin']
grid_width = grid_columns * (settings['page']['width'] + settings['page']['margin']) - settings['page']['margin']