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
New function for collapsing/expanding a split panel #27
Comments
Yeah, right now nothing is returned from calling Split(). I think a Split instance should be returned, with methods like .destroy(), .collapse(n), .expand(n) where n is the zero indexed pane number. |
+1 |
2 similar comments
+1 |
+1 |
+1 |
+1 |
One of the simpler ways to handle this is to make a click event for the splitter handle and let them handle it. Oh, and I added an updateOffset to the pairs, so you can do whatever. |
+1 |
2 similar comments
+1 |
+1 |
+2 |
+10 |
+1 |
+1 |
Thanks everyone. I went ahead an implemented something similar, with a few more features in this release. The API now works like this: var instance = Split([], ...)
instance.collapse(0)
instance.collapse(1) where Additionally, it's possible to update the sizes now: instance.setSizes([10, 40, 50]) And destroy the the instance altogether: instance.destroy() Docs are updated with the new API. Please update to the latest version, v1.1.1! |
I would like to see an enhancement to be able to collapse a split panel.
Essentially 'collapse()' would set the width (or height) to zero and the panel next to it to 100%.
A call to 'expand()' would bring back the gutter to the last state.
Collapse should also be available when min-size is not 0.
The text was updated successfully, but these errors were encountered: