summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2018-07-06 03:24:41 +0200
committeremkael <emkael@tlen.pl>2018-07-06 03:24:41 +0200
commit780c61d23789d80351476977f25699b2b5ec4c5d (patch)
treeed6f1f3ddbd5fc56195edb78dccb4148a7e10aa1
parent7ed51a63ac7aea8da6de888b04164b945ef745b5 (diff)
Expanding canvas if finishing positions are rendered
-rw-r--r--jfr_playoff/generator.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/jfr_playoff/generator.py b/jfr_playoff/generator.py
index 0680aba..b5c5e83 100644
--- a/jfr_playoff/generator.py
+++ b/jfr_playoff/generator.py
@@ -155,13 +155,16 @@ class PlayoffGenerator(object):
canvas_size = [
dimensions[0] * (
self.page['width'] + self.page['margin']
- ),
+ ) + self.page['margin'],
dimensions[1] * (
self.page['height'] + self.page['margin']
) - self.page['margin']]
if 'starting_position_indicators' not in self.page \
or not self.page['starting_position_indicators']:
canvas_size[0] -= self.page['margin']
+ if 'finishing_position_indicators' not in self.page \
+ or not self.page['finishing_position_indicators']:
+ canvas_size[0] -= self.page['margin']
PlayoffLogger.get('generator').info(
'canvas size: %s', canvas_size)
grid_boxes = ''