Ext.dataview.ListView:禁用Overscroll?

时间:2012-05-28 15:35:09

标签: sencha-touch sencha-touch-2

在sencha可滚动视图中,例如 Ext.dataview.ListView ,我们可以随时滚动屏幕上的元素列表。

如果我举个例子:http://dev.sencha.com/deploy/touch/examples/production/kitchensink/#demo/list

有没有办法阻止列表项“Alana Wiersma”?我希望这个项目与“top< = 0px”。

2 个答案:

答案 0 :(得分:11)

您的问题确实称为过度滚动。试试这个:

scrollable : {
  direction: 'horizontal',
  directionLock: true,
  momentumEasing:  {
     momentum: {
       acceleration: 30,
       friction: 0.5
     },
     bounce: {
        acceleration: 0.0001,
        springTension: 0.9999,
     },
     minVelocity: 5
  },
  outOfBoundRestrictFactor: 0   
  }

答案 1 :(得分:0)

我的第一个猜测是设置带有初始偏移的列表滚动

config:{
  scrollable:{
    direction:'vertical',
    initialOffset : {x: 0, y: VALUE}
  }
}

将VALUE替换为您需要的任何值

希望这有帮助