Skip to content

Commit 51b736b

Browse files
authored
Merge pull request #1169 from awjae/develop
fix resize not taking margin height
2 parents 4bd1ea1 + c943199 commit 51b736b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/gridstack.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1296,7 +1296,7 @@
12961296
// TODO: cellHeight = cellHeight() causes issue (i.e. remove strictCellHeight above) otherwise
12971297
// when sizing up we jump almost right away to next size instead of half way there. Not sure
12981298
// why as we don't use ceil() in many places but round() instead.
1299-
cellHeight = self.$el.height() / parseInt(self.$el.attr('data-gs-current-row'));
1299+
cellHeight = (self.$el.height() + grid.verticalMargin()) / parseInt(self.$el.attr('data-gs-current-row'));
13001300
self.placeholder
13011301
.attr('data-gs-x', o.attr('data-gs-x'))
13021302
.attr('data-gs-y', o.attr('data-gs-y'))

0 commit comments

Comments
 (0)