rc-dock
rc-dock copied to clipboard
fix: panel flex-grow may less than 1 after multiple layouts
try to fix an issue:
When I use docMove to add a panel below some panel-A, and then delete it, the panel-A size will be directly halved, After a few times like this, the size of panel-A is less than 1.
According to the calculation rules of the panel, when the flex is less than 1, it actually cannot fill the entire area This causes panel-A to be smaller and smaller.
rule:
// when less than 1, it will not fill the whole area
let flexGrow = flex * size;
I don't think the halving is necessary here, so I'm trying to submit this PR, and if the author thinks there are other issues with this, please tell me.
Thank you!