Skip to content

Commit

Permalink
Add option to hide Ranking Table in round_robin stages (#90)
Browse files Browse the repository at this point in the history
Co-authored-by: Corentin Girard <corentingirard.dev@gmail.com>
  • Loading branch information
kevinreedy and Drarig29 committed Dec 21, 2022
1 parent 238631f commit 82eecc5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ export class BracketsViewer {
showSlotsOrigin: config?.showSlotsOrigin !== undefined ? config.showSlotsOrigin : true,
showLowerBracketSlotsOrigin: config?.showLowerBracketSlotsOrigin !== undefined ? config.showLowerBracketSlotsOrigin : true,
highlightParticipantOnHover: config?.highlightParticipantOnHover !== undefined ? config.highlightParticipantOnHover : true,
showRankingTable: config?.showRankingTable !== undefined ? config.showRankingTable : true,
};

if (this.config.onMatchClick)
Expand Down Expand Up @@ -173,7 +174,9 @@ export class BracketsViewer {
groupContainer.append(roundContainer);
}

groupContainer.append(this.createRanking(groupMatches));
if (this.config.showRankingTable)
groupContainer.append(this.createRanking(groupMatches));

container.append(groupContainer);
}

Expand Down
5 changes: 5 additions & 0 deletions src/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,11 @@ export interface Config {
* Whether to highlight every instance of a participant on hover.
*/
highlightParticipantOnHover?: boolean,

/**
* Whether to show a ranking table on round-robin stages.
*/
showRankingTable?: boolean,
}

/**
Expand Down

0 comments on commit 82eecc5

Please sign in to comment.