Summary
I was wondering if there was any way to have a drop target reject a drag source, using javascript. I am aware of how to do this without javascript, but using javascript will make the program more fleixible.
Thank you
I was wondering if there was any way to have a drop target reject a drag source, using javascript. I am aware of how to do this without javascript, but using javascript will make the program more fleixible.
Thank you
Hi,
If the drag source is already dropped into the drop target, you can use dropTargetObject.dropHelper.startDragOut(dragSourceObject)
.
For example, in On Accept
event of the drop target:
// the drag source has been dropped
var droppedSource = e.value;
// reject if its name is reject_me
// this in On Accept is the drop target object
if (droppedSource.name() == 'reject_me')
this.dropHelper.startDragOut(droppedSource);
Regards