react-mosaic icon indicating copy to clipboard operation
react-mosaic copied to clipboard

minimumPaneSizePercentage clamp with the header minimum.

Open Bouh opened this issue 3 years ago • 2 comments

Feature ask

Currently we can't reduce a panel to zero because the props value by default is minimum 20%.

https://github.com/nomcopter/react-mosaic/blob/64b9d49a5bfc9bab4a01faba63a25168bb0f71da/src/Split.tsx#L31

I ask for have an option for customize the value, on both axis X and Y, the idea is to stack the panels on X, and keep 20% for Y axis, the vertical panels.

image

Current behavior

image

Bouh avatar Oct 10 '20 14:10 Bouh

You can change the default pane size like this.

<Mosaic
  resize={{ minimumPaneSizePercentage: 5 }}
...
/>

https://github.com/nomcopter/react-mosaic/blob/a80ebd407516e5b9040f8a943b9a41bd9da23835/src/types.ts#L59-L61

4dgarden avatar Oct 12 '20 14:10 4dgarden

That's for sure, but the header size is not taken into account because the height value isn't dynamic. When we have a zoom in the browser the panel can't be resized.

Here two headers in purple, zoom 150% in Chrome. image

Even with a lower zoom, 110%, the split component can't be selected. image

Bouh avatar Oct 12 '20 14:10 Bouh