I'm doing a drag and drop interaction. The very basic code is
if (event.currentTarget.dropTarget != null)
event.currentTarget.x = event.currentTarget.dropTarget.parent.x;
event.currentTarget.y = event.currentTarget.dropTarget.parent.y;
I'll have several draggable objects and droptargets. Now the problem I have is if a given droptarget already has something dropped on it, it shouldn't allow anything else to be dropped on it ie. "disabled". If I drag the object off of it, that particular target would need to be "enabled" again. Haven't come up with any idea on how to do this.
Oh yeah, all the draggable objects are able to be dropped on all of the droptargets. I'll evaluate whether the correct objects have been dropped on the correct targets later.