Zettersten / jquery.gracket.js

jquery.gracket.js - A jQuery and canvas approach to creating single elimination tournament brackets.
https://zettersten.github.com/jquery.gracket.js/
96 stars 36 forks source link

Add Score to Bracket Entry? #6

Closed gtwilliams03 closed 11 years ago

gtwilliams03 commented 11 years ago

This plug-in would be perfect for an app I am working on - but I would need to show the score of a match on the right hand side of each bracket entry in addition to the seed on the left (also my app uses a division winner vs wildcard indicator). Any chance of adding that? Your work is much appreciated!

So - in short, change this:

{"name" : "Erik Zettersten", "id" : "erik-zettersten", "seed" : 1}

To this:

{"name" : "Erik Zettersten", "id" : "erik-zettersten", "seed" : 1, "displaySeed": "D1", "score": 47}

So it would show (for matches that are completed):

[D1] [Eric Zettersten] [47]

Zettersten commented 11 years ago

I like the idea. It'd be cool if we can put any sort of data we want in there and show it how we want.

I'll ponder this for a bit but consider it done!

On Dec 16, 2012, at 1:26 AM, gtwilliams03 notifications@github.com wrote:

This plug-in would be perfect for an app I am working on - but I would need to show the score of a match on the right hand side of each bracket entry in addition to the seed on the left (also my app uses a division winner vs wildcard indicator). Any chance of adding that? Your work is much appreciated!

So - in short, change this:

{"name" : "Erik Zettersten", "id" : "erik-zettersten", "seed" : 1}

To this:

{"name" : "Erik Zettersten", "id" : "erik-zettersten", "seed" : 1, "displaySeed": "D1", "score": 47}

So it would show (for matches that are completed):

[D1] [Eric Zettersten] [47]

— Reply to this email directly or view it on GitHub.

gtwilliams03 commented 11 years ago

Thank you so much. I was able to implement your plugin very quickly. A HTML template/string for each tourney entry maybe? I'm using twitter bootstrap for my base CSS so then I could use the input-prepend and input-append for the seed and score,,respectively.

Great work!

On Dec 16, 2012, at 12:07 PM, "Erik Zettersten" notifications@github.com<mailto:notifications@github.com> wrote:

I like the idea. It'd be cool if we can put any sort of data we want in there and show it how we want.

I'll ponder this for a bit but consider it done!

On Dec 16, 2012, at 1:26 AM, gtwilliams03 notifications@github.com<mailto:notifications@github.com> wrote:

This plug-in would be perfect for an app I am working on - but I would need to show the score of a match on the right hand side of each bracket entry in addition to the seed on the left (also my app uses a division winner vs wildcard indicator). Any chance of adding that? Your work is much appreciated!

So - in short, change this:

{"name" : "Erik Zettersten", "id" : "erik-zettersten", "seed" : 1}

To this:

{"name" : "Erik Zettersten", "id" : "erik-zettersten", "seed" : 1, "displaySeed": "D1", "score": 47}

So it would show (for matches that are completed):

[D1] [Eric Zettersten] [47]

— Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHubhttps://github.com/erik5388/jquery.gracket.js/issues/6#issuecomment-11419890.

gtwilliams03 commented 11 years ago

Oh, one other thing I noticed, is some sort of min-width CSS needed for the bracket teams? My implementation of Gracket seems to render the brackets only the width of the widest team in that round. I happened to have a final round with two teams with very short team names and it was a very small div...

On Dec 16, 2012, at 12:07 PM, "Erik Zettersten" notifications@github.com<mailto:notifications@github.com> wrote:

I like the idea. It'd be cool if we can put any sort of data we want in there and show it how we want.

I'll ponder this for a bit but consider it done!

On Dec 16, 2012, at 1:26 AM, gtwilliams03 notifications@github.com<mailto:notifications@github.com> wrote:

This plug-in would be perfect for an app I am working on - but I would need to show the score of a match on the right hand side of each bracket entry in addition to the seed on the left (also my app uses a division winner vs wildcard indicator). Any chance of adding that? Your work is much appreciated!

So - in short, change this:

{"name" : "Erik Zettersten", "id" : "erik-zettersten", "seed" : 1}

To this:

{"name" : "Erik Zettersten", "id" : "erik-zettersten", "seed" : 1, "displaySeed": "D1", "score": 47}

So it would show (for matches that are completed):

[D1] [Eric Zettersten] [47]

— Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHubhttps://github.com/erik5388/jquery.gracket.js/issues/6#issuecomment-11419890.

Zettersten commented 11 years ago

The bracket recently had an update that fixed having to specify a min width in CSS for the team with the longest name.

If you download the latest version it should fix the issue you speak of.

On Dec 16, 2012, at 1:24 PM, gtwilliams03 notifications@github.com wrote:

Oh, one other thing I noticed, is some sort of min-width CSS needed for the bracket teams? My implementation of Gracket seems to render the brackets only the width of the widest team in that round. I happened to have a final round with two teams with very short team names and it was a very small div...

On Dec 16, 2012, at 12:07 PM, "Erik Zettersten" notifications@github.com<mailto:notifications@github.com> wrote:

I like the idea. It'd be cool if we can put any sort of data we want in there and show it how we want.

I'll ponder this for a bit but consider it done!

On Dec 16, 2012, at 1:26 AM, gtwilliams03 notifications@github.com<mailto:notifications@github.com> wrote:

This plug-in would be perfect for an app I am working on - but I would need to show the score of a match on the right hand side of each bracket entry in addition to the seed on the left (also my app uses a division winner vs wildcard indicator). Any chance of adding that? Your work is much appreciated!

So - in short, change this:

{"name" : "Erik Zettersten", "id" : "erik-zettersten", "seed" : 1}

To this:

{"name" : "Erik Zettersten", "id" : "erik-zettersten", "seed" : 1, "displaySeed": "D1", "score": 47}

So it would show (for matches that are completed):

[D1] [Eric Zettersten] [47]

— Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHubhttps://github.com/erik5388/jquery.gracket.js/issues/6#issuecomment-11419890. — Reply to this email directly or view it on GitHub.

gtwilliams03 commented 11 years ago

Huh. I downloaded it last night so I should have latest. Seems like if the teams with the longer names lose in the first round, the brackets in the later rounds are only as wide as the remaining longest team name, not the longest team name in the tournament, whether still in our not?

On Dec 16, 2012, at 6:58 PM, "Erik Zettersten" notifications@github.com<mailto:notifications@github.com> wrote:

The bracket recently had an update that fixed having to specify a min width in CSS for the team with the longest name.

If you download the latest version it should fix the issue you speak of.

On Dec 16, 2012, at 1:24 PM, gtwilliams03 notifications@github.com<mailto:notifications@github.com> wrote:

Oh, one other thing I noticed, is some sort of min-width CSS needed for the bracket teams? My implementation of Gracket seems to render the brackets only the width of the widest team in that round. I happened to have a final round with two teams with very short team names and it was a very small div...

On Dec 16, 2012, at 12:07 PM, "Erik Zettersten" notifications@github.com<mailto:notifications@github.commailto:notifications@github.com> wrote:

I like the idea. It'd be cool if we can put any sort of data we want in there and show it how we want.

I'll ponder this for a bit but consider it done!

On Dec 16, 2012, at 1:26 AM, gtwilliams03 notifications@github.com<mailto:notifications@github.commailto:notifications@github.com> wrote:

This plug-in would be perfect for an app I am working on - but I would need to show the score of a match on the right hand side of each bracket entry in addition to the seed on the left (also my app uses a division winner vs wildcard indicator). Any chance of adding that? Your work is much appreciated!

So - in short, change this:

{"name" : "Erik Zettersten", "id" : "erik-zettersten", "seed" : 1}

To this:

{"name" : "Erik Zettersten", "id" : "erik-zettersten", "seed" : 1, "displaySeed": "D1", "score": 47}

So it would show (for matches that are completed):

[D1] [Eric Zettersten] [47]

— Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHubhttps://github.com/erik5388/jquery.gracket.js/issues/6#issuecomment-11419890. — Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHubhttps://github.com/erik5388/jquery.gracket.js/issues/6#issuecomment-11425054.

Zettersten commented 11 years ago

Added score and display seed to bracket - 437350df4e

Closing