teijo / jquery-bracket

jQuery Bracket library for organizing single and double elimination tournaments
http://aropupu.fi/bracket/
MIT License
482 stars 253 forks source link

need fixed order players for chess #110

Open ghost opened 7 years ago

ghost commented 7 years ago

When writing chess pairing, white is listed on top with black underneath. I can enter that data in that way ok in jquery-bracket. However, once the results for the first round start to come in it starts listing the winner first instead of white first. How could I add a playerColor attribute and sort on that in each match box?

teijo commented 7 years ago

It's not currently possible to change the order without modifying the bracket library code. You'd need to call these two lines in the order you want: https://github.com/teijo/jquery-bracket/blob/d3b8ca8ee20d036d547b51679c9d2e7dfd358639/src/jquery.bracket.ts#L1166