javascript – Sencha Touch和Clusterize.js,传递触摸滚动事件

我想要一个非常大的列表来干净地滚动并希望实现Clusterize.js但Sencha似乎抓住了触摸滚动事件并且不会让它们传递下来.

Clusterize.js URL:http://nexts.github.io/Clusterize.js/

我开始了一个小提琴,显示了普通列表及其性能,我正在努力实现Clusterize …:http://jsfiddle.net/AnthonyV/9hds0has/

注意:对于较弱的移动平板电脑,我需要这项工作并在IE上表现良好.

我不想在HTML面板上启用滚动条,因为这只会干扰.

我确实尝试启用滚动条,然后添加侦听器以向下推动事件并禁用传播,但这不起作用.

{
    direction:'vertical',
    scroller: {
        listeners:{
            scrollstart:function(a,b,c){
                // stop the scroller an pass on the event;
                return false;

            },
            scroll:function(a,b,c){
                // stop the scroller an pass on the event;
                console.log('[scrollable][on scroll]');
                return false;

            },
            scrollend:function( scroller, x, y, eOpts ){
                // stop the scroller an pass on the event;
                console.log('[scrollable][on scrollend]x='+x+', y='+y);
                return false;
            }
        }
    }
}

我还查看了relayEvent和relayEvents,但这些似乎是为了在ext小部件之间推送事件.

最佳答案 答案是不要的!

Clusterize.js是实现无限滚动的一种非常酷的方式,但该功能已经内置在Sencha List小部件中.唯一的问题是,要使其正常工作或正常工作,您需要升级到Sencha Touch 2.4.2

有关如何使用它的更多信息,请参阅以下StackOverFlow问题:
Sencha Touch – How to enable Infinite Scroll

点赞