summaryrefslogtreecommitdiff
path: root/playoff.js
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2018-07-06 03:28:29 +0200
committeremkael <emkael@tlen.pl>2018-07-06 03:28:29 +0200
commitacfc6044e25c7ff7d56a62dc1f62c21a7546f560 (patch)
treefff268055bdf73a4123ff2c3bc856675f46dfba9 /playoff.js
parent31fb6dfb977fca26cf4eeb539b9f4d83f42b6a40 (diff)
Rendering connectors for finishing positions
Diffstat (limited to 'playoff.js')
-rw-r--r--playoff.js14
1 files changed, 12 insertions, 2 deletions
diff --git a/playoff.js b/playoff.js
index 301f86c..a648b4b 100644
--- a/playoff.js
+++ b/playoff.js
@@ -3,8 +3,12 @@ var playoff = {
settings: {
'winner_h_offset': 5,
'loser_h_offset': 20,
+ 'finish_winner_h_offset': 5,
+ 'finish_loser_h_offset': 20,
'winner_v_offset': -10,
'loser_v_offset': 10,
+ 'finish_winner_v_offset': -4,
+ 'finish_loser_v_offset': 4,
'loser_colour': '#ff0000',
'winner_colour': '#00ff00',
'place_winner_h_offset': 10,
@@ -12,7 +16,9 @@ var playoff = {
'place_winner_v_offset': 8,
'place_loser_v_offset': 14,
'place_loser_colour': '#dddd00',
- 'place_winner_colour': '#00dddd'
+ 'place_winner_colour': '#00dddd',
+ 'finish_loser_colour': '#ff0000',
+ 'finish_winner_colour': '#00ff00'
},
drawLine: function(ctx, line) {
@@ -39,7 +45,9 @@ var playoff = {
'winner': {},
'loser': {},
'place-winner': {},
- 'place-loser': {}
+ 'place-loser': {},
+ 'finish-winner': {},
+ 'finish-loser': {}
};
var boxes_idx = {};
for (var b = 0; b < boxes.length; b++) {
@@ -60,6 +68,8 @@ var playoff = {
var lineMethods = {
'place-winner': 'to',
'place-loser': 'to',
+ 'finish-winner': 'midpoint',
+ 'finish-loser': 'midpoint',
'winner': 'midpoint',
'loser': 'midpoint'
};