Skip to content

Instantly share code, notes, and snippets.

@mitchellsimoens
Created August 21, 2012 20:07
Show Gist options
  • Save mitchellsimoens/3418956 to your computer and use it in GitHub Desktop.
Save mitchellsimoens/3418956 to your computer and use it in GitHub Desktop.
Fire after anim
new Ext.Container({
fullscreen : true,
layout : {
type : 'card',
animation : {
type : 'slide'
}
},
items : [
{
xtype : 'toolbar',
docked : 'top',
items : [
{
xtype : 'button',
text : 'Back',
ui : 'back',
handler : function (btn) {
var cnt = btn.up('container[fullscreen]');
cnt.setActiveItem(0);
}
},
{
xtype : 'button',
text : 'Next',
ui : 'forward',
handler : function (btn) {
var cnt = btn.up('container[fullscreen]');
cnt.setActiveItem(1);
}
}
]
},
{
html : 'First',
listeners : {
order : 'after',
activate : function() {
//does not fire after anim
console.log('First activated');
}
}
},
{
html : 'Second',
listeners : {
order : 'after',
activate : function () {
//does not fire after anim
console.log('Second activated');
}
}
}
],
listeners : {
//order makes it fire after anim
order : 'after',
activeitemchange : function() {
console.log('active item change');
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment