You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
this.batchUpdate();// do this EARLY as it will call saveInitial() so we can detect where we started for _dirty and collision
816
818
letnewNodes: GridStackNode[]=[];
817
-
818
-
// if we're going to 1 column and using DOM order (item passed in) rather than default sorting, then generate that layout
819
-
letdomOrder=false;
820
-
if(column===1&&nodes?.length){
821
-
domOrder=true;
822
-
lettop=0;
823
-
nodes.forEach(n=>{
824
-
n.x=0;
825
-
n.w=1;
826
-
n.y=Math.max(n.y,top);
827
-
top=n.y+n.h;
828
-
});
829
-
newNodes=nodes;
830
-
nodes=[];
831
-
}else{
832
-
nodes=doCompact ? this.nodes : Utils.sort(this.nodes,-1,prevColumn);// current column reverse sorting so we can insert last to front (limit collision)
833
-
}
819
+
letnodes=doCompact ? this.nodes : Utils.sort(this.nodes,-1,prevColumn);// current column reverse sorting so we can insert last to front (limit collision)
834
820
835
821
// see if we have cached previous layout IFF we are going up in size (restore) otherwise always
836
822
// generate next size down from where we are (looks more natural as you gradually size down).
@@ -887,8 +873,8 @@ export class GridStackEngine {
0 commit comments