File tree 2 files changed +10
-1
lines changed
2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -310,6 +310,7 @@ Changes
310
310
311
311
#### v0.2.2 (current development version)
312
312
313
+ - fix grid initialization
313
314
- add ` cell_height ` /` cell_width ` API methods
314
315
- fix boolean attributes (issue #31 )
315
316
Original file line number Diff line number Diff line change 352
352
} , this . opts . float , this . opts . height ) ;
353
353
354
354
if ( this . opts . auto ) {
355
+ var elements = [ ] ;
355
356
this . container . find ( '.' + this . opts . item_class ) . each ( function ( index , el ) {
356
- self . _prepare_element ( el ) ;
357
+ el = $ ( el ) ;
358
+ elements . push ( {
359
+ el : el ,
360
+ i : parseInt ( el . attr ( 'data-gs-x' ) ) + parseInt ( el . attr ( 'data-gs-y' ) ) * parseInt ( el . attr ( 'data-gs-width' ) )
361
+ } ) ;
362
+ } ) ;
363
+ _ . chain ( elements ) . sortBy ( function ( x ) { return x . i ; } ) . each ( function ( i ) {
364
+ self . _prepare_element ( i . el ) ;
357
365
} ) ;
358
366
}
359
367
You can’t perform that action at this time.
0 commit comments