Allow joining of separators.
I have a 2x2 grid...
| ...... | ...... |
|---|---|
| ...... | ...... |
and I add a new column on the right of my top row and on the right of my bottom row...
| ...... | ... | ... |
|---|---|---|
| ...... | ... | ... |
I can resize the first column on both rows simultaneously...
| .. | ....... | ... |
|---|---|---|
| .. | ....... | ... |
but the last columns are controlled separately...
| .. | .. | ........ |
|---|---|---|
| .. | ....... | ... |
In some cases, this is what I want. But at times, I'd like to be able to create a column that spans both rows and is resized simultaneously. In the first case, my layout looks like...
{
'cells': [[0, 0, 1, 1], [1, 0, 2, 1], [0, 1, 1, 2], [1, 1, 3, 2], [2, 0, 4, 1], [3, 1, 4, 2]],
'rows': [0.0, 0.5, 1.0],
'cols': [0.0, 0.5, 0.75, 0.75, 1.0]
}
If I choose to do so, Origami could take this layout and combine any duplicate row/col measures into one. In this case...
{
'cells': [[0, 0, 1, 1], [1, 0, 2, 1], [0, 1, 1, 2], [1, 1, 3, 2], [2, 0, 4, 1], [3, 1, 4, 2]],
^ ^ ^ ^ ^
'rows': [0.0, 0.5, 1.0],
'cols': [0.0, 0.5, 0.75, 0.75, 1.0]
^^^^ ^^^^
}
The 0.75s in 'cols' are combined, and all references to them are adjusted accordingly (in 'cells', the "3"s will become "2"s, and the "4"s become "3"s). We get...
{
'cells': [[0, 0, 1, 1], [1, 0, 2, 1], [0, 1, 1, 2], [1, 1, 2, 2], [2, 0, 3, 1], [2, 1, 3, 2]],
'rows': [0.0, 0.5, 1.0],
'cols': [0.0, 0.5, 0.75, 1.0]
}
Using set_layout with this value will result in a 3x2 layout where all column separators span both rows.
What would the user interface for this look like?
The basic idea is like this...
http://youtu.be/T0QePhICeeY
I think an assumption could be made that any adjacent panes sharing the exact same x or y separator positions could be consolidated.
Does that code exist? Want to send a pull request?
It's a fake currently :blush: but I'd be happy to start work on the idea if anyone has use for / interest in it.
Sure! I was also thinking that it could automatically consolidate when new panes are made - so if you created the upper-right pane and then the lower-right pane, they'd auto-consolidate. And this way if you dragged the divider for the upper-right one before creating the lower right, they wouldn't consolidate. What do you think?
Very good call!