PDA

View Full Version : [FIXED-EXTJSIV-1783][4.0.0] Ext.Util.Animate.stopAnimation() does not return eLEMENT



korax
28 Apr 2011, 6:06 AM
That should be "Ext.core.Element" obviously.

Ext.Util.Animate (http://docs.sencha.com/ext-js/4-0/api/Ext.util.Animate).stopAnimation() does not return Ext.core.Element as documented. (The documentation for stopAnimation() also has an erroneous @deprecated tag.)


Ext.onReady(function() {
var cmp = Ext.create('Ext.Component', {
height: 200,
width: 300,
html: 'I am a component.',
renderTo: Ext.getBody()
});

console.log(cmp.animate({
to: {
opacity: 0,
}
}).animate({
to: {
opacity: 1
}
}).stopAnimation()); // Console logs "undefined"
});

evant
28 Apr 2011, 7:24 AM
I've fixed this up. FYI it doesn't always return an Element, it returns the current type of thing you're animating (could be a component, sprite, etc).