在Extjs 4.1中启用了拖放插件后,我有两棵树。用户可以在这些树之间拖放。下面是在这种情况下,这些树木,唯一相关的配置是viewConfig:在树和树之间拖放
树1:
viewConfig:{
plugins: [
new PmProjectManagement.viewEdit.AvailableCriteriaTreeViewDragDrop({
allowContainerDrop: true,
allowParentInsert: false,
expandDelay: 30000,
dropGroup: "secondGridDDGroup",
dragGroup: "firstGridDDGroup"
})
]
}
树2:
viewConfig:{
plugins: [
new PmProjectManagement.viewEdit.ViewConfigTreeViewDragDrop({
allowContainerDrop: true,
allowParentInsert: false,
expandDelay: 30000,
dropGroup: "firstGridDDGroup",
dragGroup: "secondGridDDGroup"
})
]
}
现在,我可以将它从一棵树下降到另一个很好,但我真正想要的是能够从树1拖到树2,从树2到树1,以及树2中。我在树2中的拖动有问题,因为ddGroup是设置为另一棵树。我也需要树1,不能在其中拖动。有没有人有这样的建议?我能想到的唯一解决方案包括在isValidDropPoint函数上使用重写并删除ddGroup限定符,但我真的很喜欢这种更优雅的方法。
耶...有这个风滚草徽章。有点惊讶没有人知道如何做到这一点。 – Reimius 2012-07-12 19:10:16
我想出了一个非常复杂的解决方案。除非有实际的兴趣,否则我不会发布它。 – Reimius 2012-08-30 20:30:04