Browse Source

fit rows should use outerwidth

pull/563/head
David DeSandro 12 years ago
parent
commit
98b1141d8e
  1. 4
      layout-modes/fit-rows.js

4
layout-modes/fit-rows.js

@ -21,7 +21,7 @@ FitRows.prototype._getItemLayoutPosition = function( item ) {
item.getSize(); item.getSize();
// if this element cannot fit in the current row // if this element cannot fit in the current row
if ( this.x !== 0 && item.size.width + this.x > this.isotope.size.innerWidth ) { if ( this.x !== 0 && item.size.outerWidth + this.x > this.isotope.size.innerWidth ) {
this.x = 0; this.x = 0;
this.y = this.maxY; this.y = this.maxY;
} }
@ -32,7 +32,7 @@ FitRows.prototype._getItemLayoutPosition = function( item ) {
}; };
this.maxY = Math.max( this.maxY, this.y + item.size.outerHeight ); this.maxY = Math.max( this.maxY, this.y + item.size.outerHeight );
this.x += item.size.width; this.x += item.size.outerWidth;
return position; return position;
}; };

Loading…
Cancel
Save