PDA

View Full Version : [FIXED] No callback for Ext.Anim ??



Sondergard
1 Nov 2011, 12:45 AM
Can it really be true that there is no callback available for animations in Sencha Touch 2?

'before' is written in the console, but 'after' is not. I'm aware that the property after does not appear in the documentation, but i was hoping it was a mistake..




Ext.Anim.run(Ext.get("infoBar"),'slide',{

direction: 'down',

duration: 200,
before: function(){

console.log("before");

},

after: function(){

console.log("after");

}


});

mitchellsimoens
1 Nov 2011, 7:55 AM
Looking at the Ext.Anim source, it is listening for the webkitTransitionEnd event to fire the after function.

Sondergard
1 Nov 2011, 12:35 PM
Hey Mitchell

The event doesn't seem to be called in neither

- Safari version 5.1.1 (7534.51.22)

- Google Crome 15.0.874.106

The same problem seems to occur in Sencha Touch 1.0
http://www.sencha.com/forum/showthread.php?116696-OPEN-602-webkitTransitionEnd-event-does-not-always-fire

Is this a bug? and is there a way to fix it?
(http://www.sencha.com/forum/showthread.php?116696-OPEN-602-webkitTransitionEnd-event-does-not-always-fire)

mitchellsimoens
1 Nov 2011, 12:50 PM
I've had after firing on ST 1.1.0 I know for a fact but I am moving this to the bugs forum and pushing to our bug tracker.

rdougan
21 Jan 2012, 3:03 PM
This class has not been touched in ST2 yet as the way animations work is changing.

In PR3, you can use something something like this:


Ext.Animator.run({
element : panel.element,
xclass : 'Ext.fx.animation.SlideIn',
direction: 'left',
duration : 500,
onEnd: function() {
console.log('onEnd');
}
});

However, chances are, this WILL change before the final release.

Edit:

FYI, i've fixed your issue anyway for the next release.