Skip to content

Height Calculation Issue in React Tournament Brackets #83

@bsbagchi

Description

@bsbagchi

Height Calculation Issue in React Tournament Brackets

Description

The library currently calculates the SVG height based only on the number of matches in the first round.

  • If the first round has fewer matches than a full power-of-2 (1, 2, 4, 8, ...), the bracket appears compressed or cut off.
  • This causes layout issues for small first rounds or non-power-of-2 participant counts.

Steps to Reproduce

  1. Use a bracket with 3 or 5 matches in the first round.
  2. Render with <GSingleEliminationBracket />.
  3. Observe the bracket height: it looks compressed and connectors may overlap or get cut off.

Expected Behavior

  • The bracket height should scale automatically to accommodate all rounds.
  • Ideally, the height should consider the next power-of-2 of first-round matches:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions