【问题标题】:ExtJS Scrolling in grid when dragging拖动时ExtJS在网格中滚动
【发布时间】:2013-03-15 03:51:04
【问题描述】:

我有一个带有“gridviewdragdrop”插件的 Ext.Grid.Panel。使用“containerScroll”属性时,我能够打开自动滚动。

viewConfig: {
    plugins: {
     ptype: 'gridviewdragdrop',
     containerScroll: true
    }
}

但是,ScrollManager 触发事件滚动的区域太小(它本质上只是垂直滚动条上箭头块的长度)。有没有办法增加这个面积?当我的指针在拖动时越过网格的顶部或底部边界时,我可以执行类似触发 ScrollManager 事件的操作吗?

【问题讨论】:

    标签: extjs extjs4.1


    【解决方案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
        }
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2022-11-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-01-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多