Interface Config

An optional config to provide to brackets-viewer.js

Hierarchy

  • Config

Properties

onMatchClick?: MatchClickCallback

A callback to be called when a match is clicked.

Default

undefined
onMatchLabelClick?: MatchClickCallback

A callback to be called when a match's label is clicked.

Default

undefined
customRoundName?: RoundNameGetter

A function to deeply customize the names of the rounds. If you just want to translate some words, please use addLocale() instead.

Default

undefined
selector?: string

An optional selector to select the root element.

Default

'.brackets-viewer'
participantOriginPlacement?: Placement

Where the position of a participant is placed relative to its name.

  • If none, the position is not added.
  • If before, the position is prepended before the participant name. "#1 Team"
  • If after, the position is appended after the participant name, in parentheses. "Team (#1)"

Default

'before'
separatedChildCountLabel?: boolean

Whether to show the child count of a BoX match separately in the match label.

  • If false, the match label and the child count are in the same place. (Example: "M1.1, Bo3")
  • If true, the match label and the child count are in an opposite place. (Example: "M1.1 (right-->) Bo3")

Default

false
showSlotsOrigin?: boolean

Whether to show the origin of a slot (wherever possible).

Default

true
showLowerBracketSlotsOrigin?: boolean

Whether to show the origin of a slot (in the lower bracket of an elimination stage).

Default

true
showPopoverOnMatchLabelClick?: boolean

Display a popover when the label of a match with child games is clicked.

Default

true
highlightParticipantOnHover?: boolean

Whether to highlight every instance of a participant on hover.

Default

true
showRankingTable?: boolean

Whether to show a ranking table on round-robin stages.

Default

true
rankingFormula?: RankingFormula

A formula to compute the ranking of the participants on round-robin stages.

See RankingItem for the possible properties on item.

Default

(item) => 3 * item.wins + 1 * item.draws + 0 * item.losses
clear?: boolean

Whether to clear any previously displayed data.

Default

false

Generated using TypeDoc