Reputation: 23
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:
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
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
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