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

[enhancement] [Request] Split Brackets

Open dnavarrojr opened this issue 10 years ago • 10 comments

#55

Interested in doing split brackets with the same number of teams on each side.

dnavarrojr avatar Mar 01 '16 23:03 dnavarrojr

I'm interested in this also do you have any update on this or suggestions on how to make it work?

thrw avatar Mar 11 '16 19:03 thrw

+1 for this feature! march madness is coming up.

jstewsy avatar Mar 11 '16 20:03 jstewsy

I just don't know how to get the css setup right the functionality for 64 teams works but it should split and start with 32 teams on each side.

thrw avatar Mar 11 '16 21:03 thrw

might I suggest instead of setting up the bracket like .bracket({ init: [leftBracket, 'lr'], init: [rightBracket, 'rl'] }) from #55 that we do something like .bracket({ init: [fullBracket, 'split'] })

jstewsy avatar Mar 11 '16 21:03 jstewsy

The API should be something that clearly shows the intention. I would perhaps go with something like this:

$("#selector").bracket({
  init: bracketData,
  layout: "split"
});

There is also already the dir parameter that is used to adjust the direction of the bracket. Another option would be to expand it with split or something more descriptive (regarding direction). It currently supports lr and rl.

teijo avatar Mar 13 '16 22:03 teijo

After looking at the code it seems like there will need to be a bunch of functional changes and not just a new set of css stylings.

Correct me if i'm wrong?

thrw avatar Mar 14 '16 19:03 thrw

Yea...

I tried my hand at starting the refactor but quickly stopped. I stopped because I was only thinking through the one use case for March Madness in particular but it seemed there should be more initializing data passed in like "region list" and the like to help determine the bracket output and have the appropriate regions grouped, etc.

jstewsy avatar Mar 14 '16 20:03 jstewsy

Any update on this or when it might be looked at?

thrw avatar Apr 21 '16 22:04 thrw

Any suggestions on modifications to get split brackets to work? I'm not good with styling.

thrw avatar Nov 15 '16 18:11 thrw

I'm not good with styling

I think it'll require considerable code modifications too.

As a hack, you could maybe combine two bracket instances and fetch the final teams from each side for the grand final.

teijo avatar Nov 17 '16 13:11 teijo