Skip to the content

Taisen Brackets対戦

Knockout brackets as SVG, from a list of ties.

Taisen (対戦, たいせん) is Japanese for a matchup: two sides facing each other. About the name

Contents

Reference · Draw a bracket, a table or a road to the final

resultsBoardSizefunction

The width and the height of a results board with rowCount rows: the width given (1280 by default) and a height of 64 + 36 + 20 + 54 a row, in units of the width over 1280.

Import it

import { resultsBoardSize } from "@johnmorrisdotca/taisen-brackets";

Definition

function resultsBoardSize(rowCount: number, options?: Pick<BroadcastOptions, "width">): { width: number; height: number; }

Parameters

NameTypeDescription
rowCountnumber

How many rows the board has.

options (optional)Pick<BroadcastOptions, "width">

The width. Default 960.

Returns

{ width: number; height: number; }

The width and the height, in pixels.

Examples

import { resultsBoardSize } from "@johnmorrisdotca/taisen-brackets";

console.log(resultsBoardSize(3, { width: 960 }));
{ width: 960, height: 212 }

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/taisen-brackets 0.20.0.