PDA

View Full Version : button stopAnimation doesn't work for me



dekely
22 Nov 2013, 7:42 AM
Hi All,
I'm using a frame animation, I want to show animation until the button is clicked.
stopAnimation doesn't do anything. if I use stopFx() it throws exceptio


{
xtype:'button',
scale: 'medium',
disabled: true,
iconCls: 'incomingCallNotifIcon',
tooltip: $W().localeManager.getLocalizationValue('application.javascript.ctiBar.notification.incomingCall'),
handler: function(this_){
this_.getEl().stopAnimation();
this_.disable();
},
listeners:{
enable: function (btn, eOpts){
btn.getEl().frame("red", 9999999, {duration: 1000});
}
}
}

dekely
28 Nov 2013, 5:01 AM
anyone?

dekely
28 Nov 2013, 5:51 AM
Here is my solution:



Ext.define('Jacada.core.NotificationButton', {
extend: 'Ext.button.Button',


inAnimation: false,

initComponent: function(){
this.callParent(arguments);
},
startNotification: function(){
var me = this;
this.inAnimation = setInterval(function(){me.getEl().frame("red");},2000);
},
stopNotification: function(){
clearInterval(this.inAnimation);
}
});