JQuery draggable, use the left side?

I have a grid in which draggable objects can be dropped onto the grid. Dragable objects are usually larger than the grid.

My problem is that when an object is dropped, it uses the center of the object to determine where it was deleted. To properly align, I want it to work where it was reset based on the left side of the object, not the center. Any ideas?

+4
source share
1 answer

I solved this by adding this to draggable: cursorAt: {left: 0}, and adding this to droppable: tolerance: "pointer". This makes the cursor decide which droppable to use not the center of the div, and by placing the cursor to the left, I can be specific to the exact mesh element.

+3
source

All Articles