我有一个带有'gridviewdragdrop'插件的Ext.Grid.Panel。使用'containerScroll'属性时,我可以打开自动滚动。
viewConfig: {
plugins: {
ptype: 'gridviewdragdrop',
containerScroll: true
}
}
但是,ScrollManager触发要滚动的事件的区域太小(它基本上只是垂直滚动条上箭头块的长度)。有没有办法增加这个区域?我可以在拖动时指针穿过网格的顶部或底部边界时触发ScrollManager事件吗?
答案 0 :(得分:1)
您可以使用配置对象告诉插件您想要使用的阈值,如下所示:
viewConfig: {
plugins: {
ptype: 'gridviewdragdrop',
containerScroll: {
vthresh: 100 // this will use threshold of 100 pixels,
} // so it will start scrolling at 100 pixels
// from the border
}
}