From 74831fe64fb436abe5634e29a5647b4839da7efe Mon Sep 17 00:00:00 2001 From: David DeSandro Date: Thu, 24 Feb 2011 22:08:16 -0500 Subject: [PATCH] src : getSegments : add simpler segmentsValue var --- jquery.isotope.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/jquery.isotope.js b/jquery.isotope.js index a2c8535..ea17f02 100644 --- a/jquery.isotope.js +++ b/jquery.isotope.js @@ -750,7 +750,8 @@ var measure = isRows ? 'rowHeight' : 'columnWidth', size = isRows ? 'height' : 'width', UCSize = isRows ? 'Height' : 'Width', - segments = isRows ? 'rows' : 'cols'; + segments = isRows ? 'rows' : 'cols', + segmentsValue; this[ namespace ][ measure ] = ( this.options[ namespace ] && this.options[ namespace ][ measure ] ) || this.$allAtoms[ 'outer' + UCSize ](true); @@ -760,8 +761,8 @@ return this; } this[ size ] = this.element[ size ](); - this[ namespace ][ segments ] = Math.floor( this[ size ] / this[ namespace ][ measure ] ); - this[ namespace ][ segments ] = Math.max( this[ namespace ][ segments ], 1 ); + segmentsValue = Math.floor( this[ size ] / this[ namespace ][ measure ] ); + this[ namespace ][ segments ] = Math.max( segmentsValue, 1 ); return this;