Skip to content

Conversation

@awjae
Copy link
Contributor

@awjae awjae commented Feb 27, 2020

Description

fix #1166 issue

// when sizing up we jump almost right away to next size instead of half way there. Not sure
// why as we don't use ceil() in many places but round() instead.
cellHeight = self.$el.height() / parseInt(self.$el.attr('data-gs-current-row'));
cellHeight = (self.$el.height() + grid.verticalMargin()) / parseInt(self.$el.attr('data-gs-current-row'));
Copy link
Member

Choose a reason for hiding this comment

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

should be self.verticalMargin() but I can change it later.

Copy link
Member

Choose a reason for hiding this comment

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

while this fixes the issue, one downside is that now you need to stretch WAY past 50% point to get next size up. So that needs to be looked at as well.

@adumesny adumesny changed the title #1166 issue fix fix resize not taking margin height Feb 27, 2020
@adumesny adumesny merged commit 51b736b into gridstack:develop Feb 27, 2020
@adumesny adumesny changed the title fix resize not taking margin height fix resize not taking margin height into account Feb 27, 2020
@adumesny
Copy link
Member

@awjae thanks for the fix. I did #1170 to further improve on it.

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.

Resizing does not work as expected

2 participants