[英]ExtJS4: How to define DnD object method in DnD plugin
I am working on a page with Drag from Grid to Tree and using gridviewdragdrop and treeviewdragdrop plugin. 我正在使用从网格拖动到树并使用gridviewdragdrop和treeviewdragdrop插件的页面上工作。
Everything works fine, but I don't really need to drag node, just need get the dragdata and dropdata, so I want to stop the drop action . 一切正常,但是我真的不需要拖动节点,只需要获取dragdata和dropdata,因此我想停止drop操作 。
I found notifyDrop method in Ext.dd.DropTarget but don't know how to define that in plugin config. 我在Ext.dd.DropTarget中找到了notifyDrop方法,但是不知道如何在插件配置中定义它。 Anyone help?
有人帮忙吗? Thanks a lot!
非常感谢!
you can use the beforedrop
event, do your thing and at the end of the event just return false;
您可以使用
beforedrop
事件,执行您的操作,并在事件结束时return false;
in there, that way you will not complete the drop, that's what I do to a special case that I have. 在那里,您将无法完成删除操作,这就是我对特殊情况所做的。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.