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

Resizer width are not considered to calculate sizes of every contentWindow #1

Open
daniherculano84 opened this issue Dec 23, 2019 · 1 comment

Comments

@daniherculano84
Copy link

Imagine we have a "main" div with 100px width, and we configure 2 content windows with 0.5 size. When we inspect the size of activeContentWindows, the sizeFractionOfParent is not 0.5 for both windows, it's 0.5 for one and 0.49xxx for the other.

This causes that, when I save these sizes and then I reload them to initialize the layout, the sizes rendered are different from first load. And if I save the sizes and I reload them several times (always without move the resizers) it will be worse. This sample is with only one resizer. If you configure a lot of contentWindows with several resizers, the effect will be more clear.

Any workaround to calculate the real size of every content window ?

Thanks.

@Tom-Rawlings
Copy link
Owner

The problem is that the windows resize slightly when you initialise them so they're never exactly the same as the sizes that you give them.

This is due to how the windows resize to try and error correct themselves.

I'm trying to fix it but I don't have a lot of time at the moment.

If you're saving and reloading the sizes in order to keep things the same between page loads / different sessions, then the best workaround I can think of is to only save the new sizes if the user has actually manually resized the window. Or set a minimum resize amount that causes the saved sizes to update, that way they won't get progressively worse between loads.

Hope this helps a bit

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

2 participants