jquery.enhsplitter icon indicating copy to clipboard operation
jquery.enhsplitter copied to clipboard

how to accomodate three panels (vertical)

Open ssjogus opened this issue 9 years ago • 6 comments

hi,

thanks for great plugin. is there any way i can have three resizable panels with this..

any help will be much appreciated..

ssjogus avatar Nov 27 '15 05:11 ssjogus

I can't say that I've tested a triple vertical split. It should work, but the movement of the splitters may be "not as expected".

I will test this later on when I get home.

To put together three splitters, you would need to have one set of split panels, then another set inside of one of those (see the demo page, I've done this but with a horizontal then a vertical). You may get different splitter movement patterns depending on if you split the first or second panel.

To steal from the demo file:

<div id="main">
    <div id="first">
        <div id="sub_first">
            [...]
        </div>
        <div id="sub_second">
            [...]
        </div>
    </div>
    <div id="second">
        [...]
    </div>
</div>

<script>
    jQuery(function ($) {
        $('#main').enhsplitter({limit: 50});
        $('#first').enhsplitter();
    });
</script>

For the alternate pattern, move #sub_first and #sub_second down into #second and change the second line of the ready function to run $('#second').enhsplitter(); instead.

Try both and see how they work. Or... I will be later when I get home from work. :)

hiltonjanfield avatar Nov 30 '15 16:11 hiltonjanfield

hi,

thanks for the reply and suggestion. but problem with this is when I drag the splitter of first panels, even the second splitter moves (without changing content position inside it). ideally when I move first splitter, only that splitter move..

so not sure how to do that..

ssjogus avatar Dec 01 '15 04:12 ssjogus

Seems that combination just won't work the way the plugin is now. It might be possible with a lot of fixes, but I haven't got time to approach it right now. On the other hand it might be a limitation of how it is designed.

I encourage you to fork the plugin and try to implement the changes! It's a great way to learn.

hiltonjanfield avatar Dec 01 '15 06:12 hiltonjanfield

Hi, Has anyone worked on this, to your knowledge?

I really like the enhsplitter features otherwise, and would love to be able to use enhsplitter, but having more than two panels in the same orientation [even four or eight] is an absolute must for me...

I even don't mind artificially dividing a certain orientation into a "Log2(N)-deep hierarchy" as you suggest but the thing is that even when dividing them up that way, it "shows" but it simply doesn't work for resizing.

Any suggestions? (or even -- do you know of any other jquery splitters which can be made to work for that, even if they're otherwise less powerful than the enhsplitter?)

Thanks

bgaspic avatar Oct 08 '17 14:10 bgaspic

To comment here on what I've found [should anyone else be facing the same problem]

https://github.com/jcubic/jquery.splitter does... kinda... work when you pile up many splitters of the same orientation.

(I mean SPL_VERT1 ( SPL_VERT11 (DIV1, DIV2), SPL_VERT12 (DIV3, DIV4) -- note that "jcubic" also cannot deal with SPL_VERT (DIV1, DIV2, DIV3, DIV4), albeit its failure mode is different than enhsplitter's failure mode),

The "jcubic" behaviour on resizing that setup isn't ideal -- but at least it doesn't fall apart.

I otherwise prefer the features of enhsplitter here, and it'd be great to return to it if this aspect gets addressed some time. Thanks for bringing it this far.

bgaspic avatar Oct 09 '17 04:10 bgaspic

Hello, I haven't had time to work on this for quite a long time, unfortunately, nor do I foresee any time to do so in the near future.

The way the splitter code is designed, I don't think it will be an easy fix.

On Sun, Oct 8, 2017 at 9:38 PM, bgaspic [email protected] wrote:

To comment here on what I've found [should anyone else be facing the same problem]

https://github.com/jcubic/jquery.splitter does... kinda... work when you pile up many splitters of the same orientation.

(I mean SPL_VERT1 ( SPL_VERT11 (DIV1, DIV2), SPL_VERT12 (DIV3, DIV4) -- note that "jcubic" also cannot deal with SPL_VERT (DIV1, DIV2, DIV3, DIV4), albeit its failure mode is different than enhsplitter's failure mode),

The "jcubic" behaviour on resizing that setup isn't ideal -- but at least it doesn't fall apart.

I otherwise prefer the features of enhsplitter here, and it'd be great to return to it if this aspect gets addressed some time. Thanks for bringing it this far.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/hiltonjanfield/jquery.enhsplitter/issues/19#issuecomment-335065622, or mute the thread https://github.com/notifications/unsubscribe-auth/AF_erQF8giJrRun9LyLvOQYWvqilnVkYks5sqaMpgaJpZM4GqSpb .

hiltonjanfield avatar Oct 16 '17 06:10 hiltonjanfield