|
|
|
@ -36,10 +36,12 @@ function renderBracket(options) { |
|
|
|
|
|
|
|
|
|
|
|
const screenWidth = window.innerWidth; |
|
|
|
const screenWidth = window.innerWidth; |
|
|
|
let roundTotalCount = roundCount; |
|
|
|
let roundTotalCount = roundCount; |
|
|
|
if (doubleButterflyMode == true && roundCount > 1) { |
|
|
|
let initialPadding = 40; |
|
|
|
|
|
|
|
if (doubleButterflyMode == true && roundCount > 4) { |
|
|
|
roundTotalCount = roundCount - 1; |
|
|
|
roundTotalCount = roundCount - 1; |
|
|
|
|
|
|
|
initialPadding = 46; |
|
|
|
} |
|
|
|
} |
|
|
|
const padding = 46 * roundTotalCount; // Account for some padding/margin
|
|
|
|
const padding = initialPadding * roundTotalCount; // Account for some padding/margin
|
|
|
|
const availableWidth = screenWidth - padding; |
|
|
|
const availableWidth = screenWidth - padding; |
|
|
|
let responsiveMatchWidth = Math.min( |
|
|
|
let responsiveMatchWidth = Math.min( |
|
|
|
365, |
|
|
|
365, |
|
|
|
@ -48,10 +50,7 @@ function renderBracket(options) { |
|
|
|
|
|
|
|
|
|
|
|
let topMargin = 0; |
|
|
|
let topMargin = 0; |
|
|
|
if (isBroadcast) { |
|
|
|
if (isBroadcast) { |
|
|
|
responsiveMatchWidth = Math.min( |
|
|
|
responsiveMatchWidth = Math.floor(availableWidth / roundTotalCount); |
|
|
|
600, |
|
|
|
|
|
|
|
Math.floor(availableWidth / roundTotalCount), |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
let screenHeight = window.innerHeight; |
|
|
|
let screenHeight = window.innerHeight; |
|
|
|
if (roundTotalCount <= 1) { |
|
|
|
if (roundTotalCount <= 1) { |
|
|
|
topMargin = 240; |
|
|
|
topMargin = 240; |
|
|
|
@ -428,8 +427,10 @@ function renderBracket(options) { |
|
|
|
matchesContainer.appendChild(titleDiv); |
|
|
|
matchesContainer.appendChild(titleDiv); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (roundIndex == 0) { |
|
|
|
if (roundIndex == 0 && roundCount > 3) { |
|
|
|
isIncomingLineIsDisabled = true; |
|
|
|
isIncomingLineIsDisabled = true; |
|
|
|
|
|
|
|
} else if (roundIndex == 0 && roundCount < 4) { |
|
|
|
|
|
|
|
isIncomingLineIsDisabled = false; |
|
|
|
} |
|
|
|
} |
|
|
|
matchDiv.innerHTML = ` |
|
|
|
matchDiv.innerHTML = ` |
|
|
|
<div class="incoming-line ${isIncomingLineIsDisabled ? "disabled" : ""}"></div> |
|
|
|
<div class="incoming-line ${isIncomingLineIsDisabled ? "disabled" : ""}"></div> |
|
|
|
|