Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stamp adds extra gap when width is multiple of columnWidth #425

Closed
doug2k1 opened this issue Oct 21, 2013 · 3 comments
Closed

Stamp adds extra gap when width is multiple of columnWidth #425

doug2k1 opened this issue Oct 21, 2013 · 3 comments
Labels

Comments

@doug2k1
Copy link

doug2k1 commented Oct 21, 2013

Hello,

When a stampped element's width is multiple of the columnWidth, the layout gets an extra gap.

This CodePen illustrate the problem: http://codepen.io/doug2k1/pen/xLaHD

Changing the lines 138 and 142 from:

lastCol = Math.min( this.cols - 1, lastCol );
and
for ( var i = firstCol; i <= lastCol; i++ ) {

to:

lastCol = Math.min( this.cols, lastCol );
and
for ( var i = firstCol; i < lastCol; i++ ) {

seems to solve the problem.

Thank you.

@desandro
Copy link
Owner

Thanks for reporting this and for providing a CodePen. This looks like a legit bug. I'll be investigating

@djavet
Copy link

djavet commented Nov 4, 2013

I try to apply the fix in my case. But it's worse thatn before. It overlapp always now:
http://www.metadelic.com/misc/masonry/index-stamp.html

Here without the fix:
http://www.metadelic.com/misc/masonry/index-stamp-without-fix.html

Simply resize the window to see the overlapping.

I search in JS the line 138 and 142, but cant find it.
I found the infos on line 2767 and 2771 in:
http://www.metadelic.com/misc/masonry/js/vendor/masonry.pkgd.js

Thx in advance.
Dom

@desandro
Copy link
Owner

This is fixed in v3.1.4. Thanks again for reporting this! 🐯

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants