how can I control de movement of a draggable in jquery?
I need to do something similar to the “snap to grid” where the draggable moves every “x” and “y” pixels
I can’t use “grid: [x, y]” (2D) because I need to make the drag on an isometric grid (3D) (I will develop the grid later, I first need to controll the drag)
for example: when I start the dragging, the draggable shouldn’t move, it has to snap to another position when the “x” and “y” are under certain conditions
thanks in advance!
ok, I’ve found what I was looking for!
in this link was the piece of code that I needed
the code is this:
//inside drag: function(event, ui)
I changed some of the constants to adjust to my grid…