We have four panels at dashboard.
Then one of them was deleted.
Next sibling one resized to occupy free space.
Then deleted view back again (added to previous place).
And sibling view auto-resized, BUT its config.dy is incorrect!!!
Please, I need assistance with it.
It is urgent for me, because I implementing own feature to adjust dashboard panels positions and size after closing/adding existing/new ones. And I am using config.(x, y, dx, dy) for calculate sizes.
Maybe we have other method to receive ACTUAL panel/view position/size in the dashboard.
Can I use some code to define actual size of dashboard panel?
For better understand here is the sample for wrong panel config changing.
We have four panels at dashboard (stage when all is fine)
It is data for one of them, which will be wrong bellow.
{x: 0, y: 7, dx: 3, dy: 3}
{$width: 556, $height: 182}
Then one of them was deleted and next sibling one resized to occupy free space (dy 3 → 10)
{x: 0, y: 0, dx: 3, dy: 10}
{$width: 556, $height: 618}
Then deleted view back again (added to previous place)
{x: 0, y: 7, dx: 3, dy: 10}
{$width: 556, $height: 361}
dy stay equals 10 but must be less, see $height changes…
can you create a snippet repeating the issue?
Fun for me. But for this panel dy is correct. The reason is that rows count incremented. But then gridColumns and gridRows is not being updated.
So I have two possible ways:
- Preserve free space for re-adding panel to prevent gridRows property changing.
- Got ACTUAL gridRows and gridColumns properties value for my feature. But then we lost initial idea of how cells/rows should be.
So, seems like I will use way 1.
Thanks to all for attention.
Have a great coding…