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

fixSize: 0 not always keeping ratio #234

Open
laurensV opened this issue Oct 21, 2016 · 2 comments
Open

fixSize: 0 not always keeping ratio #234

laurensV opened this issue Oct 21, 2016 · 2 comments

Comments

@laurensV
Copy link

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
Copy link
Author

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
Copy link
Author

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.

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

No branches or pull requests

1 participant