Dashboard panels adding size error

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!!!

Tagged:

Comments

  • 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.

  • edited September 9

    Can I use some code to define actual size of dashboard panel?

  • edited September 9

    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?

  • edited September 9

    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.

  • edited September 9

    So I have two possible ways:
    1. Preserve free space for re-adding panel to prevent gridRows property changing.
    2. 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... :)

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!