Is there any opposite method for DragManager.acc开发者_高级运维eptDragDrop(),like DragManager.removeDragDrop() which can be handled in dragExit event.any ideas..
The opposite of this:
DragManager.acceptDragDrop(component);
is this:
DragManager.acceptDragDrop(null);
Or just not call DragManager.acceptDragDrop
at all, here you can read this:
If the drag data is not in a compatible format, do not call the DragManager.acceptDragDrop() method. If the event handler does not call this method, the user cannot drop the data and the drop target will not receive the dragOver, dragExit, and dragDrop events.
actually I had the same problem, You just have to do on dragExit() something like this, to prevent handling dropExit event: event.preventDefault(); That stops propagation of the event and handling dropDrag.
精彩评论