splitting resizer suggestions (fixed box with movable inside borders)

Discussion in 'Javascript' started by Ted Zlatanov, Jan 16, 2007.

  1. Ted Zlatanov

    Ted Zlatanov Guest

    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
     
    Ted Zlatanov, Jan 16, 2007
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.

Share This Page