PDA

View Full Version : [1.1.1] cancel animation with stopfx



sharpox
17 Oct 2007, 5:45 AM
I've noticed that the stopFx() function works well to cancel animation like fadeIn or fadeOut but does nothing for animation like shift.

I had a look at the source code in adapter/yui-bridge.js and found :


Ext.lib.Anim = {
scroll : function(el, args, duration, easing, cb, scope){
this.run(el, args, duration, easing, cb, scope, YAHOO.util.Scroll);
},

motion : function(el, args, duration, easing, cb, scope){
this.run(el, args, duration, easing, cb, scope, YAHOO.util.Motion);
},

color : function(el, args, duration, easing, cb, scope){
this.run(el, args, duration, easing, cb, scope, YAHOO.util.ColorAnim);
},

...

these methods are not supposed to return an Anim object which can be used later with the stopFx() function ?

So, I've overridden these functions with :


scroll : function(el, args, duration, easing, cb, scope){
return this.run(el, args, duration, easing, cb, scope, YAHOO.util.Scroll);
},

motion : function(el, args, duration, easing, cb, scope){
return this.run(el, args, duration, easing, cb, scope, YAHOO.util.Motion);
},

color : function(el, args, duration, easing, cb, scope){
return this.run(el, args, duration, easing, cb, scope, YAHOO.util.ColorAnim);
},

and now stopFx() works well.

Is it a bug or a feature ? :-?

aconran
11 Jan 2008, 12:16 PM
sharpox -

Thanks for the bug report. We will take a look at this issue.

Thanks,