diff --git a/_layouts/elements.html b/_layouts/elements.html
index 07f8c38..e402659 100644
--- a/_layouts/elements.html
+++ b/_layouts/elements.html
@@ -73,7 +73,7 @@
- masonry
- - clearFloat
+ - fitRows
- cellsByRow
- masonryHorizontal
- fitColumns
@@ -127,7 +127,7 @@
// console.time('initializeMe');
$demo.isotope({
itemSelector : '.element',
- // layoutMode : 'clearFloat',
+ // layoutMode : 'fitRows',
masonry : {
columnWidth : 120
},
diff --git a/src/jquery.isotope.js b/src/jquery.isotope.js
index 8413619..4ec60fb 100755
--- a/src/jquery.isotope.js
+++ b/src/jquery.isotope.js
@@ -274,7 +274,7 @@
- // ====================== ClearFloat ======================
+ // ====================== fitRows ======================
@@ -568,11 +568,11 @@
});
- // ====================== clearFloat ======================
+ // ====================== fitRows ======================
$.extend( $.Isotope.prototype, {
- _clearFloatLayout : function( $elems ) {
+ _fitRowsLayout : function( $elems ) {
var instance = this;
return $elems.each( function() {
var $this = $(this),
@@ -580,25 +580,25 @@
atomH = $this.outerHeight(true),
x, y;
- if ( instance.clearFloat.x !== 0 && atomW + instance.clearFloat.x > instance.width ) {
+ if ( instance.fitRows.x !== 0 && atomW + instance.fitRows.x > instance.width ) {
// if this element cannot fit in the current row
- instance.clearFloat.x = 0;
- instance.clearFloat.y = instance.clearFloat.height;
+ instance.fitRows.x = 0;
+ instance.fitRows.y = instance.fitRows.height;
}
// position the atom
- x = instance.clearFloat.x + instance.posLeft;
- y = instance.clearFloat.y + instance.posTop;
+ x = instance.fitRows.x + instance.posLeft;
+ y = instance.fitRows.y + instance.posTop;
instance._pushPosition( $this, x, y );
- instance.clearFloat.height = Math.max( instance.clearFloat.y + atomH, instance.clearFloat.height );
- instance.clearFloat.x += atomW;
+ instance.fitRows.height = Math.max( instance.fitRows.y + atomH, instance.fitRows.height );
+ instance.fitRows.x += atomW;
});
},
- _clearFloatReset : function() {
- this.clearFloat = {
+ _fitRowsReset : function() {
+ this.fitRows = {
x : 0,
y : 0,
height : 0
@@ -606,11 +606,11 @@
return this;
},
- _clearFloatGetContainerSize : function () {
- return { height : this.clearFloat.height };
+ _fitRowsGetContainerSize : function () {
+ return { height : this.fitRows.height };
},
- _clearFloatResize : function() {
+ _fitRowsResize : function() {
this.width = this.element.width();
return this.reLayout()
}