@ -449,20 +449,20 @@
} ,
} ,
_getSegments : function ( namespace , isRows ) {
_getSegments : function ( namespace , isRows ) {
var measure = isRows ? 'rowHeight' : 'columnWidth' ,
var measure = isRows ? 'rowHeight' : 'columnWidth' ,
size = isRows ? 'height' : 'width' ,
size = isRows ? 'height' : 'width' ,
UCSize = isRows ? 'Height' : 'Width' ,
UCSize = isRows ? 'Height' : 'Width' ,
segments = isRows ? 'rows' : 'cols' ;
segments = isRows ? 'rows' : 'cols' ;
this [ namespace ] [ measure ] = ( this . options [ namespace ] && this . options [ namespace ] [ measure ] ) || this . $allAtoms [ 'outer' + UCSize ] ( true ) ;
this [ namespace ] [ measure ] = ( this . options [ namespace ] && this . options [ namespace ] [ measure ] ) || this . $allAtoms [ 'outer' + UCSize ] ( true ) ;
// if colW == 0, back out before divide by zero
// if colW == 0, back out before divide by zero
if ( ! this [ namespace ] [ measure ] ) {
if ( ! this [ namespace ] [ measure ] ) {
$ . error ( UCSize + ' of ' + segments + 'calculated to be zero. Stopping Ionize plugin before divide by zero. Check that the width of first child inside the ionize container is not zero.' )
$ . error ( measure + 'calculated to be zero. Stopping Ionize plugin before divide by zero. Check that the width of first child inside the ionize container is not zero.' )
return this ;
return this ;
}
}
this [ size ] = this . element [ size ] ( ) ;
this [ size ] = this . element [ size ] ( ) ;
this [ namespace ] [ segments ] = Math . floor ( this [ size ] / this [ namespace ] [ measure ] ) ;
this [ namespace ] [ segments ] = Math . floor ( this [ size ] / this [ namespace ] [ measure ] ) ;
this [ namespace ] [ segments ] = Math . max ( this [ namespace ] [ segments ] , 1 ) ;
this [ namespace ] [ segments ] = Math . max ( this [ namespace ] [ segments ] , 1 ) ;
return this ;
return this ;