Open zhanghengwebs opened 3 months ago
Not too sure what you mean here, how are you removing and adding the panel? Do you have a small code snippet?
has a current open issue with pending PR https://github.com/mathuo/dockview/issues/582
should already be posible using the onWillShowOverlay
event, I will try and create an example to demonstrate.
Regarding 1.) I think I have the same issue. I have a toolbar where you can show/hide several different tool windows. There is one toggle button for each registered component. When enabling a button, a panel for that component is added to the layout using addPanel
. When disabling a button, the panel is removed via removePanel
(also tried panel.api.close()
, same behaviour).
The problem occurs after hiding a panel that is the only panel inside its group. If you then add the panel again, it appears at a different position compared to where it was when it was hidden. However, when it is not the only panel in the group when it is hidden, then adding it again places it back into the group.
I think the enhancement would be for each panel to "remember" where it was when it was removed so it can be added back with a position and size as close as possible to what it had when it was hidden. Currently this only works when the original group still exists. I can imagine the difficult part is that the layout could have changed in between and guessing the "as close as possible" layout could be challenging. The impact on UX would be IMHO quite significant though when using a toolbar to manage visible panels.
- Not too sure what you mean here, how are you removing and adding the panel? Do you have a small code snippet?
- has a current open issue with pending PR Expose event for moving tab within same panel #582
- should already be posible using the
onWillShowOverlay
event, I will try and create an example to demonstrate.
Currently, the panel positions are declared during registration. For example, panel B is located to the right of panel A, and panel C is located to the right of panel B. When I delete panels A, B, and C in sequence and generate C, B, and A in reverse order, their positions are different from before deletion, even if I do not change any registration properties because when C is registered, B no longer exists.
If you check whether you have registered before when registering the panel, and if the same ID is used, then continue to use the original one, can this solve the problem
We look forward to your reply
Firstly, I added a panel and then deleted it, but I need to display it again. However, when it is displayed again, its position changes. Is there any way to make it return to its original position?