-
Notifications
You must be signed in to change notification settings - Fork 168
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
Wrong initial position for elements if container has any margin. #2
Comments
Thanks for pointing this out. It seems that it is related to setting width in percentage, i.e. if you set a fixed width (e.g. 200px) it works fine.. I'll be looking into this one, thanks |
I am also trying to columns/images with a percentage width. Is that possible? |
container.freetile('layout'); is not prevented when $(window).resize(); is called. Workaround for issue yconst#2; not a fix
One thing I noticed creating my em-based grid, was that Freetile had problems if the em-width couldn't be converted to exact pixel dimensions. For example, if 1 em is 16 px, and the tile width is 1.666 em. Using percentages for widths, it would be easy to end in situation like this. |
I don't know whether anyone resolved this, but I am also having the same problem. The solution I came to was to simply fire the layout function twice as shown below. This doesn't seem very elegant, but is a quick, easy fix. Any other developments out there on this issue?
|
elihorn - I tried your solution - But - The solution you proposed fixed an issue in ie9 but broke freetile in ie10 and ie8 in my case - I've never had issues in decent browsers. People might want to add that to their list of tests while implementing. |
Hello Yannis, have you any news about this bug to give us ? |
@VincentFTS Not really. Tried @desandro's getSize to circumvent this but it broke some stuff so I had to let it go. |
Any news on this? |
I was able to get it working by doing a 'layout' call after a timer. Something like this:
-Jason |
I know this is an old post but the issue persists and I found a cleaner way to call
|
Hello Yannis, first of all, let me thank you for such a great and very helpful plugin.
I'm trying to build a grid of elements (in my case with fixed width), with some margins between those elements. The technique that I use, implies a negative margin for elements container (to normalize positions for first element in each row) and a positive margin for elements in a grid.
Now on initial placement I have some miscalculated position for elements but after any following reflows (e.g. window resize) position recalculates more accurate.
Here is an example: http://jsfiddle.net/S9eBE/
Thank you!
The text was updated successfully, but these errors were encountered: