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

Change height of team DIVs (question)

Open codenchips opened this issue 9 years ago • 4 comments

I'm looking to put multi-line data in the team container.

I've tried editing the sass and the ts but always end up throwing out the connectors, I realise heights are calculated #on the fly.

Can anyone give me a hint as to the best way to achieve this?

Thanks

codenchips avatar Nov 17 '16 10:11 codenchips

I think at the moment it does require modifying both the styles and code. It's something that should probably be improved so that you could more easily configure it without modifying the library.

I don't really have any easy pointers, would need to check out all the height calculations from the code.

teijo avatar Nov 17 '16 13:11 teijo

Thanks for your reply. I think I figured it out. I'll post my solution here when I'm sure it's OK.

On 17 Nov 2016 13:13, "Teijo Laine" [email protected] wrote:

I think at the moment it does require modifying both the styles and code. It's something that should probably be improved so that you could more easily configure it without modifying the library.

I don't really have any easy pointers, would need to check out all the height calculations from the code.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/teijo/jquery-bracket/issues/87#issuecomment-261243084, or mute the thread https://github.com/notifications/unsubscribe-auth/ABx9AJAdT-7Cl_mbKHMoCC_m2kCvDkTFks5q_FLegaJpZM4K1JBX .

codenchips avatar Nov 17 '16 13:11 codenchips

OK, This may not be the cleanest / best way but it has the desired effect;

jquery.bracket.sass

$boxHeight: 52px  /* was 22 */
.team 
    min-height: $boxHeight

jquery.bracket.ts ~ line 1176

     // edited this;
    this.el.css('height', (this.round.bracket.el.height() / this.round.size()) + 'px');
    // to 
    this.el.css('height', ((this.round.bracket.el.height() / this.round.size()) * 2) + 'px');

Effectively more than doubles the node height and keeps everything in line.

codenchips avatar Nov 17 '16 14:11 codenchips

Came here wondering about the same issue, thanks @deanparkes your workaround saved me quite some time and works like a charm.

tbgse avatar Jan 02 '17 15:01 tbgse