how to animate transition from right to left on Sencha Touch 2?

微笑、不失礼 提交于 2019-12-04 14:47:54

问题


I want to animate the transition when a card is activate on a Panel. any idea please?

The main.setActiveItem(1) is changing the card but I want to animate the transition from right to left (not the default from left to right)

I have this function:

buttonBackImageDetalle: function(button, e, options) {

    var main = this.getMain();
    //Ext.fx.Animation.setDirection('right');
    main.setActiveItem(1);
    console.log('<-- back');

}

Thanks for your time!


回答1:


Try this:

main.animateActiveItem(1, {type: 'slide', direction: 'right'})




回答2:


Hi if you are using controller use ref for main and pass xtype of view as follows.

this.getMain().animateActiveItem(your_xtype, {type: 'slide', direction: 'right'});


来源:https://stackoverflow.com/questions/10323083/how-to-animate-transition-from-right-to-left-on-sencha-touch-2

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!