File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed
Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -310,6 +310,7 @@ Changes
310310
311311#### v0.2.2 (current development version)
312312
313+ - fix grid initialization
313314- add ` cell_height ` /` cell_width ` API methods
314315- fix boolean attributes (issue #31 )
315316
Original file line number Diff line number Diff line change 352352 } , this . opts . float , this . opts . height ) ;
353353
354354 if ( this . opts . auto ) {
355+ var elements = [ ] ;
355356 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 ) ;
357365 } ) ;
358366 }
359367
You can’t perform that action at this time.
0 commit comments