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

How to fill or stretch blocks in large screens? #131

Open ghost opened 10 years ago

ghost commented 10 years ago

Hello, such a beautiful plugin, but i am facing an issue now. when i using fitzone option in large screen, it shows some blank area in right side of the screen, how to solve this? screen

kombai commented 10 years ago

Hi, Please use version 1.02 and 'slice' engine. This is the video for this demo: https://www.youtube.com/watch?v=pWYjURCeAcs Best

ghost commented 10 years ago

Thanks for your fast replay, I just fond a solution from #83,

my css is : .size11 { width: 8%; height: 10%; } .size12 { width: 8%; height: 20%; }

and method is:

            wall.reset({
                selector: '.brick',
                cellH: function(height) {
                    return height / 10;
                },
                cellW: function(width) {
                    return width / 100 *8;   
                },
                onResize: function() {
                    wall.refresh(wall.container.width(), wall.container.height());
                }
            });

wall.fitZone(wall.container.width(), wall.container.height());

after loading my page, page layout is good. but when i re-sizing page, bricks are placing wrong

kombai commented 10 years ago

Hi, Please try with sizeCache options:

wall.reset({
  sizeCache: false,
 ...
});
ghost commented 10 years ago

How to reload freewall?