Grid-stack horizontal swap
Horizontal swap in 2*2 is bringing controls down
gridstack version: 0.3.0
- Created 2*2 grid stack: first row: 1 2 second row: 3 4 this.serializedData = [ { x: 0, y: 0, width: 6, height: 3 }, { x: 6, y: 0, width: 6, height: 3}, { x: 0, y: 3, width: 6, height: 3 }, { x: 6, y: 3, width: 6, height: 3} ];
- I have disabled resizable as that is not required to me
- Dragging 1 to 3 or 3 to 1 or 2 to 4 or 4 to 2 is working as expected (Vertical swapping is happening)
- But Dragging 1 to 2 is moving 2 and 4 down below 1 and is increasing container height and making it 3 rows with first row to be 1 second row 3, 2 and third row 4.
Expected behaviour
Horizontal swapping should work like 3 and 4 should be swapped without any increase in height or moving widgets down
Actual behaviour
But Dragging 1 to 2 is moving 2 and 4 down below 1 and is increasing container height and making it 3 rows with first row to be 1 second row 3, 2 and third row 4
Attachment
Please find drag.html file in the attachment
Note: I have read in this website only that this horizontal gridstack.js-master.zip swap is not possible. Can you please help in resolving the issue or confirm me whether this can be done or not.
Thanks, Sailaja.
Hi, @sailajachellu ! Horizontal swaps aren't currently possible, but are on the roadmap. There are several open tickets for this already, so I'm closing this ticket. To answer your question succinctly: there is no current way to achieve this, but that'll be rectified in a future release.
Hi @radiolips ! Are there any updates on this issue? Thank you!
@veroena radiolips is no longer involved in this lib - I have rewritten the collision and nodes will now (since 4.x) swap horizontally if the same size