Skip to content
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

Resize next element once current element is fully closed #85

Open
iamalexchip opened this issue Jun 4, 2017 · 10 comments
Open

Resize next element once current element is fully closed #85

iamalexchip opened this issue Jun 4, 2017 · 10 comments

Comments

@iamalexchip
Copy link

iamalexchip commented Jun 4, 2017

Hi @nathancahill I have a 3 div setup. If for example I'm increasing the right div, I want the mid div to move left when its min width has been reached like codepen does. Mine just stops when it reaches the mid div's min width.
Example of how codepen divs work (screen capture):
ezgif com-video-to-gif

@nathancahill
Copy link
Owner

Interesting, thanks for the nice screen recording. I think this could be implemented as an option, let me see what it would take.

@iamalexchip
Copy link
Author

okay cool

@nathancahill nathancahill changed the title How to resize divs like codepen? Resize next element once current element is fully closed Jun 29, 2017
@jasonreiche
Copy link

Nathan, First, thanks for all the work on this project. It's a very useful tool and almost exactly what I need. The only major thing missing is exactly what zerochip has mentioned. As the gutter events don't provide any information about which gutter bar is being manipulated or information about which elements are being resized, it's impossible to use the event information to detect this.

@oskarkrawczyk
Copy link

oskarkrawczyk commented Jan 16, 2018

I was just about to post a request for this. Having this would be really awesome.

Btw. The panels in redesigned JSFiddle actually use Split.js! Thanks for the awesome lib @nathancahill

EDIT

If this is even implemented, the current way of uncollapsing would also need to be modified, unless click or press-drag-release can work well enough together.

Also having a uncollapse(index) method would be helpful. For example in the case of JSFiddle a collapsed panel would be completely invisible, and bringing it back would have to be done with an external button (tabs or similar).

@nathancahill
Copy link
Owner

This is high on the feature list. Once I get some bandwidth I'll implement this.

@oskarkrawczyk
Copy link

Fantastic! If there's any way I can help let me know. Is there a way to donate?

@nathancahill
Copy link
Owner

Thanks for asking. I had set up an Open Collective for Split.js here: https://opencollective.com/splitjs/, but never got around to spreading the word. I'll add a link in the readme too.

@oskarkrawczyk
Copy link

Hey @nathancahill, I don't want to put any pressure on this or anything, but do you think you'll be able to spend some time on this ticket in the upcoming days/weeks/months?

Thanks a lot for the great lib!

@long-lazuli
Copy link

Hello,
I did an attempt this morning, and I think I'm pretty close.
We can probably do better.

All I did is passing a 'recomposed Pair' to the adjust function, when the dragging offset is off limit.

It is working with a boolean option: 'pushingPanes', which I would be happy to rename to follow your coding style.

The remaining problem I can see right now, is that sometime you can go a bit to fast and the dragged pair would not resize completely.

You may wish to try, see : 'examples/pane-pushes.html'

@lucademian
Copy link

Did anything ever get added for this? @nathancahill

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants