PDA

View Full Version : Fx.stopFx() not canceling previous fx'es?



KimH
27 Apr 2007, 12:08 AM
I have tried the following on a div:

Ext.get('MyDiv').on('click', function() {
Ext.get('MyDiv').stopFx();
Ext.get('MyDiv').shift({ y:100, duration:.4 });
});
Ext.get('MyDiv').on('mouseout', function() {
Ext.get('MyDiv').stopFx();
Ext.get('MyDiv').shift({ y:200, duration:1 });
});
When I click on the div it moves to a predefined position. However, if the cursor leaves the div before it gets to this position it is not stopped and the new FX applied. The new FX does not happen until the first FX is finished. Is this a bug or should I do it differently?

jheid
27 Apr 2007, 3:50 AM
I know that the JQuery-Adapter doesn't support animation stopping if I'm right (although the YUI adapter does).

So, it would be helpfull if you can say which adapter you use.

KimH
30 Apr 2007, 6:12 AM
Well... "the default"... which is YUI ;-)

jack.slocum
30 Apr 2007, 7:43 AM
Stopping of animations is an asyncronous operation. Is it actually continuing to play the animation or skipping to the last frame? Can you try it with a long duration?