如何在拖动时从树节点中删除类?
我有一个动态填充的 Ext.tree.TreePanel。我可以从树中拖动节点并将它们放入面板中,但是当我拖动它们时,节点默认图标类也会出现在拖动代理中。我如何删除该类?
I have a dynamically populated Ext.tree.TreePanel. I can drag nodes from the tree and drop them in a panel but when I drag them, the nodes default iconclass also appears in the drag proxy. How do I remove that class?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我还没有测试过这个,但只是查看了一些源代码,拖动的幽灵是通过 TreeNode 元素克隆获得的,所以你不能明确告诉它不要添加你的类,但你第一次有机会删除该类位于 TreePanel.startdrag 事件中:
I haven't tested this, but just looking through some of the source code, the dragged ghost is obtained via an TreeNode element clone, so you can't tell it explicitly not to add your class, but the first chance you get to delete the class is in the TreePanel.startdrag event: