johnwalley / allotment

A React component for resizable split views
https://allotment.mulberryhousesoftware.com/
MIT License
949 stars 52 forks source link

Distinguish between user-drag and window resize #817

Open ROTGP opened 3 weeks ago

ROTGP commented 3 weeks ago

Is there a clean way to distinguish between when panels are resized as a result of user-dragging and when panels are resized as a result of the window being resized? The use case is: if a user drags a pane closed - it should then stay closed when the window is made bigger. However at the moment, the closed pane resizes and reopens, which is not what the user will want. Furthermore, in the case of user-dragging, it would be helpful to know when a pane is being dragged/closed directly by the user, as opposed to adjacent panes which trigger the resize of their neighbours.