3
我们正在使用GWT,我们需要创建两个拖放树形网格。每棵树都包含父母和孩子(现在最多两个等级)。 下面是我们需要能够做到:GWT在树内和树形网格之间拖放
使用案例
- 拖动从一个棵树电网给其他家长。
- 将父1父2(1将成为2孩子,和所有1的孩子将成为2个孩子) - >请不要问:d
- 将孩子从父母一方到另一个(内同一棵树网格)
- 将孩子同一棵树网格内最高级别(孩子会成为父母)
- 将孩子的其他树格有两个选项
1 - 顶级 - 孩子从一棵树1将成为树2上的父项。
2 - 父项 - 来自树1的子项将成为树网格上的父项的子项2.
如果这没有多大意义,我们还没有完整的背景,所以这就是我们所知道的。
问题
我们可以在同一棵树网格拖曳。如果我们想要拖动单元格的行被隐藏,我们将滚动条设置为true,以便当用户在其中拖动时,滚动条会滚动。事情是这样:
private void setDraggableOptions(DragAndDropColumn<?, ?> column) {
// retrieve draggableOptions on the column
DraggableOptions draggableOptions = column.getDraggableOptions();
draggableOptions.setScroll(true);
// use template to construct the helper. The content of the div will be set
// after
draggableOptions.setHelper(HelperType.CLONE);
// opacity of the helper
draggableOptions.setOpacity((float) 0.8);
// cursor to use during the drag operation
draggableOptions.setCursor(Cursor.MOVE);
// set the revert option
draggableOptions.setRevert(RevertOption.ON_INVALID_DROP);
// prevents dragging when user click on the category drop-down list
draggableOptions.setCancel("select");
column.setDraggableOptions(draggableOptions);
}
现在的问题是,设置树电网滚动,用户将永远无法对象拖动到第二棵树作为滚动将尝试始终保持对象的网格内。
我们正在使用gwtquery-plugins
是否有任何想法,以解决此问题?非常感谢你提前。