My question relates to a great javascript library called packery which I use to create a masonry style layout. I also use a sister script called draggabilly to allow the user to drag (reorder) elements on the page. I'm currently doing something pretty similar to normal use:
http://codepen.io/desandro/pen/CKbkw
When you drag an item, the interface leaves a space large enough to remove the item. I wanted to temporarily set the div to indicate that this is the item to be deleted. All I really need is a way to get the x, y coordinates for where the drag and drop item comes to rest, but I can't figure out how to get this information.
and I use the dragMove listener, where I expect to display my div and provide it with the correct coordinates:
draggie.on( 'dragMove', function(draggieInstance, event, pointer) {
});
Any help would be greatly appreciated.
source
share