jquery-bracket icon indicating copy to clipboard operation
jquery-bracket copied to clipboard

question: initilizing an empty double elimination bracket

Open onthespotqa opened this issue 9 years ago • 0 comments

I'm trying to use this library to draw the brackets for a tournament app i'm writing.

My question is about the best way to send in the initial data for a double elimination bracket.

The documentation states that for an empty bracket the results part of the json should have the following nesting: [[[[]]], [], []]

This nesting works fine when the number of teams is 8, but when the number of teams is greater than 8 the following error occurrs: Uncaught TypeError: Cannot read property 'winner' of undefined

The JSON i generated for the initial bracket in my app was this. {"teams":[["Bladedance This!","Commando Fluffy Sweets"],["Fireteam HVP","Sprinkles \u0026 His Maple Leaves"],["DAb Trio","Get Scope Tricks"],["Ultra Girth","The Matawhores"],["Fireteam w/ a BYE",null]],"results":[[[[]]],[],[]]}

What am i missing about the results json in order to successfully generate a double elim bracket for more than 8 teams.

onthespotqa avatar Jan 28 '17 01:01 onthespotqa