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

Display a bracket without last rounds ?

Open Nayte91 opened this issue 8 years ago • 4 comments

Hello Teijo,

And thank you for your awesome work ! I'm currently trying some stuff around it, and I have a question :

Is there a way to stop displaying a bracket before the end ? Example : I want my single bracket tournament to stop at semi-finals. So I don't want to display the final match, and my bracket would stop with 2 matchs, up and down. Or the same at quarter-finals, with 4 matchs ending the bracket. And so on... Do you think it's possible ?

Thank you very much in advance, and keep up the good work ! Best regards,

Nayte91 avatar Feb 10 '18 15:02 Nayte91

Hi,

That's not currently possible, although it might not be too hard to implement if you want to have a go at it. Is the use case to have a different / more prominent way of displaying the final matches?

teijo avatar Feb 11 '18 16:02 teijo

Hello,

Yes I'm working on it, it's barely done, As in my other post, this feature represents a shift of mentality; I don't see 1 bracket=tournament anymore; but 1 bracket=1 group of a single phase.

So I may need to stop a bracket before the "end" to make a new one, very small (with only the final or semis) that will occur another day or hour, maybe with different properties (BO3-BO5, stream, ... any info), like you said. This use case is mainly in single-elimination's scenarios.

Or I may need to stop a bracket before the "end" to continue into another phase, of X groups, without resetting the seeds & positions. This use case is manly in double-elimination scenarios, as a single-elimination bracket can be chopped off in barely every directions.

Nayte91 avatar Feb 11 '18 18:02 Nayte91

Alright, makes sense 👌

teijo avatar Feb 11 '18 18:02 teijo

Hello, So I made some moves from my side, I'm not that good in code, but I added a parameter "max round: INT" to your bracket.

Then I test if maxround is > to the actual number of rounds (730). if then, I let the connectors (1174), the matches (1213) and the main bracket div (1259) happen.

It works for single-bracket. But it's very dirty, and alter the double-bracket badly. But I still think the logic of a new param is good, and maybe something more compliant with double-bracket will be "outgoing players : INT" (default : 1) more than "maxround: INT". (for the other topic : a param "fake round: false/true ?)

What happen is a display/hide of matches, like you did for the 3rd place final. Also, you can choose to display/hide matches between 2 BYES.

Problem is the number of unadapted functions, like your bigData formatting or what it returns, and I will be unable to correct that.

Anyway does this logic seem you OK ?

Nayte91 avatar Feb 15 '18 12:02 Nayte91