user1452041
user1452041

Reputation: 23

Sencha Touch 2 - Slide Animation on button

I'm trying to get a slide animation on a button inside a container but I'm unable to do it.

By the way, fade and flip was working fine.

I want to do animation like shown below when all buttons are shown.

Here's the image of what I am trying to achieve:

http://oi47.tinypic.com/r9o8w7.jpg

EDIT :

I am running the below code inside initialize() event of the container.

 Ext.Anim.run(this.getComponent('btnId'),'flip',{
            out: true,
            delay: 1000,
            duration: 500,
 });

Upvotes: 0

Views: 3014

Answers (2)

Karen
Karen

Reputation: 11

Ext.Anim.run(Ext.getCmp('btnId'), 'slide', {
    direction: 'left',
    duration: 1000
})

But the important thing is to ensure you require Ext.Anim in your application. Put this in your main app.js

Ext.requires('Ext.Anim');

or

Ext.application({
    name: 'myapp',
    requires: [
         'Ext.Anim'
    ]
});

Upvotes: 1

hekomobile
hekomobile

Reputation: 1388

Hi @user1452041 try this please,

Ext.Anim.run(Ext.getCmp('btnId'), 'slide', {
    direction: 'left'
})

direction attribute depend you if you want to left or right

I hope this helps. :) Ciao

Upvotes: 0

Related Questions