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

Fix 3+ split layout #1

Closed
nathancahill opened this issue Aug 30, 2015 · 4 comments
Closed

Fix 3+ split layout #1

nathancahill opened this issue Aug 30, 2015 · 4 comments

Comments

@nathancahill
Copy link
Owner

Because of a float division or rounding error, when splitting in 3 or more panes, the total width is too wide and the last pane falls off.

@RodMontgomery
Copy link

It's not due to either float division or rounding error. It's due to the code being written as if the percentages for the two panes whose boundary is being moved add to 100%. If there are more than two panes, this is not true.

I have a fixed version, for which I will submit a pull request as soon as I figure out how. (GitHub newbie here.)

I also have a transposition into the key of vertical splits, which I will also include in my pull request.

@nathancahill
Copy link
Owner Author

Awesome! Excited to check it out :)

@RodMontgomery
Copy link

Still trying to wrap my brain around GitHub. Submitted one pull request just to fix the recalc-on-drag. Will do the vertical splits separately.

@nathancahill
Copy link
Owner Author

Check this out @RodMontgomery. Wrapped my head around the >2 case. Both the first and the last gutters should be guttterWidth / 2. Then, to calculate the widths of pairs of elements, use the pairs initial width percentage of parent (instead of 100%).

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