summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2018-05-22 11:51:21 +0200
committeremkael <emkael@tlen.pl>2018-05-22 11:51:21 +0200
commit20da60a6381a012677ef4ab720afa3e169eac0fd (patch)
tree8383c0f3029293e4a8f5b19b4087e74cf6d4b058
parentb662da599a1cf673790648f5c0c7b6962e529bfa (diff)
parent5b527501aff6e529146a91364fa1a1b1485ef11e (diff)
Merge branch 'bugfixes' into devel
-rw-r--r--jfr_playoff/generator.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/jfr_playoff/generator.py b/jfr_playoff/generator.py
index 6d107bd..22bdc82 100644
--- a/jfr_playoff/generator.py
+++ b/jfr_playoff/generator.py
@@ -137,7 +137,8 @@ class PlayoffGenerator(object):
match_height = canvas_size[1] / len(phase.matches)
row_no = 0
for match in phase.matches:
- grid_y = int(row_no * match_height +
+ grid_y = self.page['margin'] / 2 if dimensions[1] == 1 else \
+ int(row_no * match_height +
0.5 * (match_height - self.page['height']))
PlayoffLogger.get('generator').info(
'grid box (%d, %d) position: (%d, %d)',