Skip to content

Commit

Permalink
Fixed error on container height computing when surroundingGutter is s…
Browse files Browse the repository at this point in the history
…et to false. Removed bottom gutter to be consistent with top behaviour. Gutters are applied on the sides but not on top / bottom.
  • Loading branch information
Spope committed Aug 13, 2020
1 parent 702ab22 commit 586a20e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build/minimasonry.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ MiniMasonry.prototype.layout = function() {
this._columns[nextColumn] += this._sizes[index] + (this._count > 1 ? this.conf.gutterY : this.conf.ultimateGutter);//margin-bottom
}

this._container.style.height = (this._columns[this.getLongest()] - (this.conf.surroundingGutter ? 0 : this._conf.gutterY)) + 'px';
this._container.style.height = (this._columns[this.getLongest()] - this.conf.gutterY) + 'px';
};

MiniMasonry.prototype.getNextColumn = function(index) {
Expand Down
2 changes: 1 addition & 1 deletion build/minimasonry.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/minimasonry.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ MiniMasonry.prototype.layout = function() {
this._columns[nextColumn] += this._sizes[index] + (this._count > 1 ? this.conf.gutterY : this.conf.ultimateGutter);//margin-bottom
}

this._container.style.height = (this._columns[this.getLongest()] - (this.conf.surroundingGutter ? 0 : this._conf.gutterY)) + 'px';
this._container.style.height = (this._columns[this.getLongest()] - this.conf.gutterY) + 'px';
};

MiniMasonry.prototype.getNextColumn = function(index) {
Expand Down

0 comments on commit 586a20e

Please sign in to comment.