Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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!

like image 854
lito Avatar asked Dec 06 '22 15:12

lito


1 Answers

Try this:

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

like image 143
Thiem Nguyen Avatar answered Jan 18 '23 10:01

Thiem Nguyen