T
Ted Zlatanov
I'm working on a splitting resizer, something that will take a div
element with absolute bounds (let's say 100x100) and split it into N
pieces with N-1 borders (each piece is another div with absolute
positioning). Each border is draggable, so if you divide into, say, 3
equal pieces (33/33/34) and you drag the last border, the piece sizes
will end up at 33/60/7.
So this:
[ | | ]
becomes
[ | |]
in rough ASCII. The vertical sizes in this example remain at 100 for
each piece. The resizer should work vertically as well (with static
horizontal sizes) but that's pretty trivial.
My questions are:
1) has this been implemented already? I've looked around and tried
the dojo.widget.SplitContainer, but it was s-l-o-w and sizes didn't
get set appropriately. Any other suggestions?
2) is there a better way to implement this, perhaps with less
Javascript? I'm thinking of alternate ways than dragging the border:
clicking in the "new" location of the border, using a visual scroll
wheel, buttons to go left/right... Any helpful ideas would be most
welcome.
Thanks
Ted
element with absolute bounds (let's say 100x100) and split it into N
pieces with N-1 borders (each piece is another div with absolute
positioning). Each border is draggable, so if you divide into, say, 3
equal pieces (33/33/34) and you drag the last border, the piece sizes
will end up at 33/60/7.
So this:
[ | | ]
becomes
[ | |]
in rough ASCII. The vertical sizes in this example remain at 100 for
each piece. The resizer should work vertically as well (with static
horizontal sizes) but that's pretty trivial.
My questions are:
1) has this been implemented already? I've looked around and tried
the dojo.widget.SplitContainer, but it was s-l-o-w and sizes didn't
get set appropriately. Any other suggestions?
2) is there a better way to implement this, perhaps with less
Javascript? I'm thinking of alternate ways than dragging the border:
clicking in the "new" location of the border, using a visual scroll
wheel, buttons to go left/right... Any helpful ideas would be most
welcome.
Thanks
Ted