File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -389,7 +389,7 @@ export class GridStack {
389
389
* see http://gridstackjs.com/demo/serialization.html
390
390
**/
391
391
public load ( layout : GridStackWidget [ ] , addAndRemove : boolean | ( ( w : GridStackWidget , add : boolean ) => void ) = true ) : GridStack {
392
- let items = GridStack . Utils . sort ( layout ) ;
392
+ let items = GridStack . Utils . sort ( layout , - 1 , this . _prevColumn || this . opts . column ) ;
393
393
394
394
// if we're loading a layout into 1 column (_prevColumn is set only when going to 1) and items don't fit, make sure to save
395
395
// the original wanted layout so we can scale back up correctly #1471
@@ -1264,7 +1264,7 @@ export class GridStack {
1264
1264
// remove any key not found (null or false which is default)
1265
1265
for ( const key in node ) {
1266
1266
if ( ! node . hasOwnProperty ( key ) ) { return ; }
1267
- if ( node [ key ] === null || node [ key ] === false ) {
1267
+ if ( ! node [ key ] && node [ key ] !== 0 ) { // 0 can be valid value (x,y only really)
1268
1268
delete node [ key ] ;
1269
1269
}
1270
1270
}
You can’t perform that action at this time.
0 commit comments