开发者

Removing DragManager.acceptDragDrop() in flex

开发者 https://www.devze.com 2023-03-03 16:07 出处:网络
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:

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消