Reputation: 1733
I'd like to stack my Masonry bricks from the bottom up.
This question was answered before, but that modification and fork of Masonry use a very old version of the script now. The newer version of Masonry has bug fixes which I needed.
So does anyone know how to apply the old solution to the newer script?
var position = (opts.fromBottom) ? {
left: props.colW * shortCol + props.posLeft,
bottom: minimumY
} : {
left: props.colW * shortCol + props.posLeft,
top: minimumY
};
Here is a Fiddle with the newer Masonry script. I added fromBottom option at line 74. The code in question is around line 285.
This question is obsolete in the newest version of Masonry (now a standard option).
Upvotes: 9
Views: 376
Reputation: 19
When using stack-bond it is very important to let the masonry dry before you apply a new layer. So, best is to stack line-by-line and not first up and then to the side, so you can always control the level of the total stack. Interleaving stack bond with a layer of running bond now and then is good practice and decorative too.
Upvotes: 0
Reputation: 11936
Replace this (starting at line 287):
var position = {
top: minimumY + this.offset.y
};
with this:
var position = (this.options.fromBottom) ? {
bottom: minimumY + this.offset.y
} : {
top: minimumY + this.offset.y
};
Upvotes: 9