Browse Source

Merge branch 'master' into gh-pages

v1
David DeSandro 13 years ago
parent
commit
a107963aa0
  1. 6
      _posts/tests/2011-05-18-centered-masonry.html

6
_posts/tests/2011-05-18-centered-masonry.html

@ -67,13 +67,13 @@ category: tests
var parentWidth = this.element.parent().width(); var parentWidth = this.element.parent().width();
// i.e. options.masonry && options.masonry.columnWidth // i.e. options.masonry && options.masonry.columnWidth
colW = this.options.masonry && this.options.masonry.columnWidth || var colW = this.options.masonry && this.options.masonry.columnWidth ||
// or use the size of the first item // or use the size of the first item
this.$filteredAtoms.outerWidth(true) || this.$filteredAtoms.outerWidth(true) ||
// if there's no items, use size of container // if there's no items, use size of container
parentWidth; parentWidth;
cols = Math.floor( parentWidth / colW ); var cols = Math.floor( parentWidth / colW );
cols = Math.max( cols, 1 ); cols = Math.max( cols, 1 );
// i.e. this.masonry.cols = .... // i.e. this.masonry.cols = ....
@ -101,7 +101,7 @@ category: tests
var prevColCount = this.masonry.cols; var prevColCount = this.masonry.cols;
// get updated colCount // get updated colCount
this._getCenteredMasonryColumns(); this._getCenteredMasonryColumns();
return ( this.masonry.cols !== prevColCount ) return ( this.masonry.cols !== prevColCount );
}; };
$.Isotope.prototype._masonryGetContainerSize = function() { $.Isotope.prototype._masonryGetContainerSize = function() {

Loading…
Cancel
Save