Created
August 21, 2012 20:07
-
-
Save mitchellsimoens/3418956 to your computer and use it in GitHub Desktop.
Fire after anim
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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