kombai / freewall

Freewall is a cross-browser and responsive jQuery plugin to help you create grid, image and masonry layouts for desktop, mobile, and tablet...
MIT License
1.85k stars 375 forks source link

fixSize: 0 not always keeping ratio #234

Open laurensV opened 8 years ago

laurensV commented 8 years ago

For certain widths of the container the ratio of the tiles are not kept, even though the function fixSize is set to 0, which should always keep the correct ratio's. When the container width for example is 835, the ratio's are not kept.

var wall = new Freewall("#freewall");
wall.reset({
    selector: '.brick',
    animate: true,
    fixSize: 0,
    cellW: function(cwidth){
        var cellW = 300;
        return cellW;
    },
    cellH:function(cheight){
        var cellH = 300;
        return cellH;
    },
    onResize: function() {
        wall.fitWidth(835);
    }
});
wall.fitWidth(835);

However, when I fit to a width of 800, it is working fine and it is keeping the ratio's. An example of this issue can be found here: http://laurensverspeek.nl/freewall-fixsize-test/example/fixsize-not-working.html

(http://laurensverspeek.nl/freewall-fixsize-test/example/fixsize-working.html shows the version with a width of 800, which is working)

laurensV commented 8 years ago

Also, is there a way to obtain the brick inside the cellW or cellH function? This way I might be able to force the ratio's myself inside the cellW and cellH functions by looking at the class of the brick.

laurensV commented 8 years ago

Is anyone working on this issue or planning to work on this issue? Really hope this issues gets fixed as it is quite a major issue.