I have a batch of small stones, which are draggable and can be dropped in some groups. For proper highlighting I use the OVER and OUT event. But I have some troubles with the DROP and OUT event. As I drag and drop a stone in the group the OVER and DROP events are triggered, but as soon as I pick up the next stone (move it just enough that I'm over the threshold for dragging) the 'old' OUT event is trigged.
Has anyone experienced same problems and could help me out?
My droppable, the group, is stetted up like this:
$('.group').droppable({
accept: this.canItBeDropped.bind(this),
drop: this.drop.bind(this),
over: this.over.bind(this),
out: this.out.bind(this),
});
And my draggables, the stones, like this:
this.$stone.draggable({
distance: 3,
revert: 'invalid',
revertDuration: 400,
scroll: false,
stack: '.stone',
refreshPositions: true,
});
EDIT
After some further digging into the library, I found out that it has something to do with my custom accept function. But the library calls it with the new stone, not with the old one what I would have expected.