Results 1 to 3 of 3

Thread: Temporarily disable animations in navigation view

  1. #1
    Sencha User
    Join Date
    Sep 2012
    Posts
    8
    Vote Rating
    1
      0  

    Default 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:

    PHP Code:
    Ext.define("myapp.view.Main", {    
      
    extend'Ext.navigation.View',   
      
    xtype:  'mainpanel',    config: {
            
    fullscreentrue,
            
    autoDestroyfalse,
            
    // start with animations disabled for startup, will re-enable later
            
    layout: {
              
    type'card',
              
    animationfalse
            
    }
        },
        
    enableAnimations: function() {
          
    this.getLayout().setAnimation({
            
    duration300,
            
    easing'ease-out',
            
    type'slide',
            
    direction'left'
          
    });
        },
        
    disableAnimations: function() {
          
    this.getLayout().setAnimation(false);
        }
    }); 
    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.

    Any thoughts on how to accomplish this?

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,553
    Answers
    3931
    Vote Rating
    1272
      0  

    Default

    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 @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  3. #3
    Sencha User
    Join Date
    Sep 2012
    Posts
    8
    Vote Rating
    1
      0  

    Default

    Quote Originally Posted by mitchellsimoens View Post
    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.
    That is good to know.

    However, that doesn't solve my main issue in that if I disable animations on the navigation view's layout and then re-enable them, the animations do not work, and sometimes even content doesn't display at all.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •