Skip to content

Conversation

@adumesny
Copy link
Member

the code that checked for cell height and unit being the same was incorrect.

Testing Done: calling this should be no-op, but wasn't
this.grid.cellHeight( this.grid.cellHeight() );

code right below uses correct names
this.opts.cellHeightUnit = heightData.unit;
this.opts.cellHeight = heightData.height;

P.S. this is why Typescript is good - you don't do those stupid JS typos....

the code that checked for cell height and unit being the same was incorrect.

Testing Done:  calling this should be no-op, but wasn't
this.grid.cellHeight( this.grid.cellHeight() );
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.2%) to 69.209% when pulling 93523a5 on adumesny:develop into 10e141e on gridstack:develop.

adumesny added 2 commits September 18, 2017 21:10
the code that checked for cell height and unit being the same was incorrect.

Testing Done:  calling this should be no-op, but wasn't
this.grid.cellHeight( this.grid.cellHeight() );
@coveralls
Copy link

Coverage Status

Coverage increased (+0.2%) to 69.59% when pulling b00f816 on adumesny:develop into 10e141e on gridstack:develop.

var e;
var w;
var gridstackHTML =
'<div class="grid-stack">' +
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

those are just formatting 2 spaces change. ignore.

expect(grid.cellHeight()).toBe(120);
});
});

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added simple test above to call cellHeight() after the fact to get more coverage. I don't know how to test to make sure grid changes height when increasing row height (80->120) which would fail to work correctly in the nested case (but might be ok otherwise).

$('.grid-stack').gridstack(options);
var grid = $('.grid-stack').data('gridstack');
var widgetHTML =
' <div class="grid-stack-item">' +
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

again indentation fixes. ignore

var heightData = Utils.parseHeight(val);

if (this.opts.cellHeightUnit === heightData.heightUnit && this.opts.height === heightData.height) {
if (this.opts.cellHeightUnit === heightData.unit && this.opts.cellHeight === heightData.height) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code fix to use actual vars

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants