Modulo:TeamBracket: differenze tra le versioni
Contenuto cancellato Contenuto aggiunto
r |
fix uso width |
||
Riga 155:
=============================================================================== --]]
function TeamBracket:addGap(row, col, width, debug_info)
width = width or
if self.last_element[row] + 1 < col then
local gap = tostring(col - self.last_element[row] - 1)
Riga 164:
end
end
self.last_element[row] = col + width - 1
end
Riga 213:
function TeamBracket:addPath(row1, row2, row_gap, next_match)
local col = self.current_col + self.current_width
local half_gap = row_gap / 2
if not (row1 or row2) then return end
Riga 221:
self.rows[row1+1]:tag('td'):cssText(style.path_bottom)
for r = row1+1, row1+3 do self.last_element[r] = col end
for r = row1+4, row1+4+half_gap-1 do self:addGap(r, col,
self.rows[row1+2]:tag('td')
:attr('rowspan', half_gap + 2)
Riga 230:
self.rows[row2+2]:tag('td'):cssText(style.path_top)
for r = row2, row2+2 do self.last_element[r] = col end
for r = row2-half_gap, row2-1 do self:addGap(r, col,
self.rows[row2-half_gap]:tag('td')
:attr('rowspan', half_gap+2)
Riga 236:
end
local middle_row
middle_row = (row1 and (row1 +
for r = middle_row-1, middle_row+2 do self:addGap(
--self:addGap(middle_row
--self:addGap(middle_row+1, col+1, 1, 'ap3')
self.rows[middle_row]:tag('td'):cssText(style.path_bottom)▼
self.rows[middle_row
end
Line 301 ⟶ 302:
-- team cell
local teamCell = self.rows[row]:tag('td'):attr('rowspan', '2'):cssText(style.team_cell):wikitext(team_name):newline()
--local teamCell = self.rows[row]:tag('td'):attr('rowspan', '2'):cssText(style.team_cell):wikitext(
if not show_seed and (not self.hideSeeds) then
teamCell:attr('colspan', '2')
Line 363 ⟶ 364:
local cell=self.rows[row_base]:tag('td')
:attr('rowspan', '2')
:attr('colspan', self.current_width
:cssText(style.path_bottom)
if debug then cell:css('background-color', '#ADD8E6') end
cell = self.rows[row_base+2]:tag('td')
:attr('rowspan', '2')
:attr('colspan', self.current_width
:cssText(style.path_top)
if debug then cell:css('background-color', '#ADD8E6') end
Line 412 ⟶ 413:
self.rows[row]:tag('td')
:cssText(style.header_third_place)
:attr('colspan', self.current_width
:wikitext("Finale 3° posto")
:newline()
Line 422 ⟶ 423:
local name = self.args[string.format('RD%d-group%d', self.current_round, group_number)]
if name then
local span = self.current_col + self.current_width -
self:addGap(row, self.current_col, self.current_col + span, 'g')
self:addGap(row+1, self.current_col, self.current_col + span, 'g')
Line 457 ⟶ 458:
self.current_round = round
self.render_match[round+1] = {}
self.current_width = (self.hideSeeds and
local match_number = math.pow(2, self.rounds - round)
local gap = gap_function(row_count, match_number)
Line 474 ⟶ 475:
end
end
self.current_col = self.current_col + self.current_width +
end
local third_place = self:getTeamArg(self.rounds, 'team', 3)
--if true then return third_place end
if third_place then -- semifinale 3° e 4° posto
self.current_col = self.current_col - self.current_width -
local offset = gap_function(row_count, 1) / 2 + (self.compact and 1 or 0) + 6
if offset+5 > row_count then
|