需要:ExtJS 中自定义树到树拖放实现的方向/想法
我需要一些关于 ExtJS 中两棵树之间拖放的组合功能。
第一个所需功能非常简单,只是将内置拖放功能隔离到单个树。
第二个必需的功能是我不希望用户能够将节点从左树拖放到右树中的任何节点。
该操作不应从左侧树中删除节点 >,从而可以将同一节点从左树拖动到右树中的多个位置。
我的问题是:我应该采取哪种方法来组合这两个功能,利用 TreePanel
对象中现有的可能性,而无需再次发明轮子?我不是在寻找一个完整的解决方案(虽然这会很好;-)),而是在寻找如何处理拖/放区域、事件等。
I need some combined functionality regarding drag'n'drop between two trees in ExtJS.
The first required feature is very simple and is just the builtin drag'n'drop features isolated to a single tree only.
The second required feature is that I wan't the user to be able to drag a node from the left tree and drop it at any node in the right tree.
The action should not remove the node from the left tree, thus creating the possibility of dragging the same node from the left tree to multiple places in the right tree.
My question is: Which approach should I take to combine these two functionalities, utilizing the existing possibilities in the TreePanel
object without inventing the wheel again? I am not looking for a complete solution (it would be nice though ;-) ), but rather how to handle drag/drop-zones, events and so on.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好的。我现在一直在考虑这个问题,以下方法似乎对我有用:)
我已将 left 树配置为:
right 树的配置如下这:
两棵树都已设置为启用拖放:
所有叶节点都具有以下配置:
所有文件夹都设置为:
结论是,我选择覆盖一些内置的拖放方法树面板,同时仍然保持内置功能。
Okay. I have been thinking about this some time now, and the following approach seems to work for me :)
I have configured the left tree as this:
The right tree is configured like this:
Both trees has been set to enable Drag'n'Drop:
All leaf nodes have the following configuration:
All folders are set to:
The conclusion is, that I have chosen to override some of the builtin drag'n'drop methods in the treepanel while still maintaining the builtin functionality.