split icon indicating copy to clipboard operation
split copied to clipboard

Suggestion with collapse and minSize

Open DemersM opened this issue 5 years ago • 3 comments

In my point of view, collapse should resize to 0 even if the minSize is superior. The minSize should affect the size when dragging/resizing only.

Then we could use the collapse function to hide the pane while assuring that it wont be smaller than the minSize when visible.

This will be closer to the definition of the word collapse.

DemersM avatar Mar 05 '19 16:03 DemersM

This will be closer to the definition of the word collapse.

Not really. If you collapse a real world object, it doesn't shrink to an infinitesimal point, it just goes into its "smallest state". To me, collapsing to minSize seems intuitive and correct. If I want the pane to collapse to zero then I'll set 0 as the min size.

I suspect this is one of those situations where either version of the function will be correct for some use cases and incorrect for others.

looeee avatar Sep 17 '19 03:09 looeee

I agree with the OP. I'm sure there are 20 who will disagree with me. :)

I need to find a way to use Split.js for it's resizing of panes but also to use it like an accordion (or Bootstrap collapsible, whatever).

DaleyKD avatar Nov 12 '21 15:11 DaleyKD

+1 on this enhancement

cloudsolace avatar Jul 23 '22 05:07 cloudsolace