antoniandre / splitpanes

A Vue 3 (and 2) reliable, simple and touch-ready panes splitter / resizer.
https://antoniandre.github.io/splitpanes
MIT License
1.89k stars 168 forks source link

Can drag pane beyond min-size #160

Open truesteps opened 2 years ago

truesteps commented 2 years ago

Heya! I have an issue, where I have defined a size of 20 and a min size of 15 for a pane, but whenever I try and drag the pane beyond under the min size, it is allowed to.

It feels like there is some sort of easing.

What is funny, that it also resizes the splitpane on the right. I have 3 columsn and the first column has min size, if I drag it under the min size, the last column also gets smaller as if the middle pane is pushing in between them.

These three panes are in a horizontal pane as well. Two horizontal and three vertical in the first horizontal.

code:

<splitpanes class="custom-theme" horizontal :push-other-panes="false" :dbl-click-splitter="false">
                <pane size="80">
                    <splitpanes
                        class="custom-theme splitpanes__inner"
                        :horizontal="$vuetify.breakpoint.mdAndDown"
                        :push-other-panes="false"
                        :dbl-click-splitter="false"
                    >
                        <pane min-size="15" size="20">
                        </pane>

                        <pane size="40" class="splitpanes__pane--relative">
                        </pane>

                        <pane size="40">
                        </pane>
                    </splitpanes>
                </pane>

                <pane size="20">
                                </pane>
</spitplanes>

I attached a video.

https://user-images.githubusercontent.com/12614944/161519365-b866df4d-a031-4746-8039-34ae157c1e24.mov

truesteps commented 2 years ago

I added a reproduction on codepen https://codepen.io/truesteps/pen/RwxxpyX

mei2015 commented 2 years ago

why not use px for size

truesteps commented 2 years ago

@mei2015 would that fix it? Other than that, if I don't use a relative measurement then the layout would be broken on different screen sizes wouldn't it? I don't see a point in calculating this, that's additional operation that should be unnecessary.

minyoung90 commented 2 years ago

Same problem here. "push-other-panes" is not worked properly.

chris-deep commented 9 months ago

I just posted the same issue. I guess this is not fixed? I'm using current version and it still has the bug. I don't have time to modify / debug / fix it myself. But, if you found a workaround I'd be interested to hear what if anything worked. I guess this library is dead, none of the opened issues get fixed from what I can tell.

https://github.com/antoniandre/splitpanes/issues/201

MattTheCuber commented 6 months ago

Just wanted to share some resources that I was going to create an issue with:

Minimum Reproducible Example

<splitpanes :push-other-panes="false" style="height: 400px">
  <pane min-size="20">1</pane>
  <pane>2</pane>
  <pane>3</pane>
</splitpanes>

https://codepen.io/MattTheCuber/pen/eYoVLyb