-
15 Nov 2012 12:00 PM #1
Unanswered: Temporarily disable animations in navigation view
Unanswered: Temporarily disable animations in navigation view
When I start up my app, or if a user is jumping forward or backwards many pages, I want to temporarily disable navigation view animations.
I tried the following:
I call enableAnimations() or disableAnimations() as needed before pop() and push(). The title bar will animate, but my view content will not, and in fact will some times not display at all.PHP Code:Ext.define("myapp.view.Main", {
extend: 'Ext.navigation.View',
xtype: 'mainpanel', config: {
fullscreen: true,
autoDestroy: false,
// start with animations disabled for startup, will re-enable later
layout: {
type: 'card',
animation: false
}
},
enableAnimations: function() {
this.getLayout().setAnimation({
duration: 300,
easing: 'ease-out',
type: 'slide',
direction: 'left'
});
},
disableAnimations: function() {
this.getLayout().setAnimation(false);
}
});
Any thoughts on how to accomplish this?
-
19 Nov 2012 6:22 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,641
- Vote Rating
- 434
- Answers
- 3107
The navigation bar doesn't use animation from the layout. You need to change the animation property of the navigation bar using the setAnimation method on it.
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
19 Nov 2012 6:27 AM #3


Reply With Quote