Skip to content

Commit dbe5850

Browse files
authored
Merge pull request #1047 from radiolips/bugfix/937
Fix #937
2 parents 12ea11b + ab419e1 commit dbe5850

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

doc/CHANGES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ Change log
2424

2525
## v0.5.2-dev (upcoming changes)
2626

27+
- fix widgets not animating when animate: true is used. on every move, styles were recreated-fix should slightly improve gridstack.js speed ([#937](https://github.com/gridstack/gridstack.js/issues/937)).
2728
- fix moving widgets when having multiple grids. jquery-ui workaround ([#1043](https://github.com/gridstack/gridstack.js/issues/1043)).
2829
- switch to eslint ([#763](https://github.com/gridstack/gridstack.js/issues/763)).
2930
- null values to addWidget() exception fix ([#1042](https://github.com/gridstack/gridstack.js/issues/1042)).

src/gridstack.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1094,14 +1094,15 @@
10941094
if (typeof maxHeight == 'undefined') {
10951095
maxHeight = this._styles._max;
10961096
}
1097+
1098+
if (this._styles._max !== 0 && maxHeight <= this._styles._max) { // Keep this._styles._max increasing
1099+
return ;
1100+
}
10971101
this._initStyles();
10981102
this._updateContainerHeight();
10991103
if (!this.opts.cellHeight) { // The rest will be handled by CSS
11001104
return ;
11011105
}
1102-
if (this._styles._max !== 0 && maxHeight <= this._styles._max) { // Keep this._styles._max increasing
1103-
return ;
1104-
}
11051106

11061107
if (!this.opts.verticalMargin || this.opts.cellHeightUnit === this.opts.verticalMarginUnit) {
11071108
getHeight = function(nbRows, nbMargins) {

0 commit comments

Comments
 (0)