I'm trying to find an better solution to drag multiple elements at once, all elements snapping to a grid, with jQuery UI draggable.
I found a working solution there for the multiple drag part. I adapted it to be able to use the grid with a "round to multiple" function :
function roundM(number, multiple) {
return Math.round(number / multiple) * multiple;
}
and saving the previous offset. You can see full code in this fiddle.
As you can see, it's working when you drag elements at a normal speed, but when dragging quickly, the other elements do not follow correctly the dragged element.
For now I can keep my solution, but if someone has a better one, I will be glad to test it :)
Thanks