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
Set splitter position dynamically #14
Comments
👍 |
updated version (fix to ev.originalEvent): function triggerSplitterDrop(pane, vDrop) {
var offset = pane.offset();
var ev = {
which: 1,
pageX: offset.left,
pageY: offset.top
};
ev.originalEvent = ev;
var mdEvent = $.Event('mousedown', ev);
ev.pageY = vDrop || offset.top;
ev.originalEvent = ev;
var mmEvent = $.Event('mousemove', ev);
var muEvent = $.Event('mouseup', ev);
pane.trigger(mdEvent);
pane.trigger(mmEvent);
pane.trigger(muEvent);
} and call it: var myPane = $('div.split-pane').children('.split-pane-divider');
triggerSplitterDrop(myPane); |
Closed
Yes, that would be a good idea. Other people have requested that too. Their use case being collapsing one component. I will implement it soon - I hope :) I'm thinking of a syntax something like this: $('div.split-pane').splitPane('first-component', 20); |
In v 0.6.0 one can do this
or
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I was wondering whether you'd be open to allowing setting the splitter position dynamically. My use case for this is remembering the last splitter position of the user.
I'm currently doing this outside of your code via the following:
The text was updated successfully, but these errors were encountered: