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 {
389389 * see http://gridstackjs.com/demo/serialization.html
390390 **/
391391 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 ) ;
393393
394394 // 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
395395 // the original wanted layout so we can scale back up correctly #1471
@@ -1264,7 +1264,7 @@ export class GridStack {
12641264 // remove any key not found (null or false which is default)
12651265 for ( const key in node ) {
12661266 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)
12681268 delete node [ key ] ;
12691269 }
12701270 }
You can’t perform that action at this time.
0 commit comments