PDA

View Full Version : Animate single element with custom animation



Ayame
14 Sep 2011, 4:13 AM
I'm trying to animate an element (panel, div, doesn't matter) with a custom animation but can't get it to work. I've tried using the example code on the dev docs, but still it fails to work. The element changes width, but does not process the animation nor does it fire the callback function.

Suggestions anyone?

Ext.fly('myid').setWidth(500,{
duration: 500,
easing: 'elasticIn',
callback: function(){ console.log("finished"); },
scope: this
});

AndreaCammarata
14 Sep 2011, 5:25 AM
Hi Ayame.
Take a look at this Thread.

http://www.sencha.com/forum/showthread.php?146810-animations

Hope this helps.

Ayame
15 Sep 2011, 2:06 AM
Thanks! That works!

Was the method I was using a deprecated method then? It is literally taken from the Sencha Docs...