-
Notifications
You must be signed in to change notification settings - Fork 43
Possible Positioning error #124
Comments
This is due to the items being compacted when added. If you turn compact off on dashlayout prop it appears as desired. |
Ill have a bit of a think how i can determine if an item has been added after being declared |
yes please, I would like to leave compact on if possible, so if user moves it around it fills the gaps, but then when the page positions are saved and the page refreshed it should return to the same position as it was when saved. Currently that is not the case. |
Actually, I just tried your suggestion and it does solve the issue for me. I turn off compact unless they are in edit mode (draggable) to move the boxes around, and the boxes load in correct positions on a page refresh. So I think its all good for me. |
I think ive fixed it now. https://codesandbox.io/s/vue-responsive-dash-rj25l?file=/src/App.vue |
Great thanks, will try it out next build. |
Closing for now. I can open again if there is are more questions |
Hi
I found a strange case where the positions of the dash-items are not where they are meant to be from the layout config.
see example
https://codesandbox.io/s/vue-responsive-dash-fhkwx?file=/src/App.vue
The box 2 should be at the top at y=0 however it is positioned at y=6
in code it is
items: [
{ id: "1", x: 6, y: 3, width: 6, height: 3 },
{ id: "2", x: 9, y: 0, width: 3, height: 3 },
{ id: "3", x: 0, y: 0, width: 8, height: 3 },
]
in debug it is
{"id":"2","x":9,"y":6,"top":386,"left":573,"width":3,"widthPx":178,"height":3,"heightPx":178,"draggable":true,"resizable":true},
There seems to be enough space at the top for it to fit.
I also found if i changed the order it seemed to fix it, e.g. following seems to work.
In my case the order is user defined so I can't control the order of the items, so this is an issue for me.
Hopefully you can find a fix.
Regards
Peter
The text was updated successfully, but these errors were encountered: