1. #1
    Sencha User
    Join Date
    Jul 2012
    Location
    Italy
    Posts
    84
    Answers
    1
    Vote Rating
    4
    Tegola is on a distinguished road

      0  

    Default Unanswered: NavigationView: drill down without animating

    Unanswered: NavigationView: drill down without animating


    Hello,
    there is a way to add items to a navigationview without animating them?

    I've tried add() instead of push(), but then I found that they're essentially the same thing.

    Thanks

  2. #2
    Sencha User bricemason's Avatar
    Join Date
    Jan 2008
    Location
    Upstate NY
    Posts
    280
    Answers
    49
    Vote Rating
    44
    bricemason has a spectacular aura about bricemason has a spectacular aura about bricemason has a spectacular aura about

      0  

    Default


    Considering this snippet from the source of the Ext.navigation.View class:

    Code:
    /**
    * @cfg
    * @hide
    */
    layout: {
       type: 'card',
       animation: {
           duration: 300,
           easing: 'ease-out',
           type: 'slide',
           direction: 'left'
       }
    }
    the animation is baked in. You could override this by just specifying:

    Code:
    layout: 'card'
    in your navigation view but then I'd ask why not just use a card layout to begin with?

    Brice
    Brice Mason
    Front End Developer
    Modus Create

    @bricemason
    bricemason.com

    Sencha Touch Screencasts
    Vimeo - Sencha Touch Channel

    Github Projects:
    Sencha Cordova Builder enables the automatic creation, building, and running of PhoneGap (Cordova) projects with Sencha Touch.

    Am I Sencha Touch Ready? checks your system to determine what you need to do to start Sencha Touch development. If you're having trouble getting up and running, try this out.

    Sencha Tools Bridge allows Sencha SDK Tools to co-exist with Sencha Cmd on the same system.

  3. #3
    Sencha User
    Join Date
    Jul 2012
    Location
    Italy
    Posts
    84
    Answers
    1
    Vote Rating
    4
    Tegola is on a distinguished road

      0  

    Default


    I just want to disable the animation temporarily. That's because I'm trying to restore my application's state by using routes, and I want it to show the navigation view at a specific level, like if the user tapped things to reach a specific card.

    Any chance?

  4. #4
    Sencha User
    Join Date
    Jul 2012
    Location
    Italy
    Posts
    84
    Answers
    1
    Vote Rating
    4
    Tegola is on a distinguished road

      0  

    Default


    Maybe something like this?

    Code:
    var anim = navView.getLayout().getAnimation();
    navView.getLayout().setAnimation(false);
    navView.add(myNewCard);
    navView.getLayout().setAnimation(anim);
    I'm going to try that soon, I'm not on my computer right now.

  5. #5
    Sencha User
    Join Date
    Jul 2012
    Location
    Italy
    Posts
    84
    Answers
    1
    Vote Rating
    4
    Tegola is on a distinguished road

      0  

    Default


    I've ended doing:
    Code:
    navView.getLayout().getAnimation().disable();
    navView.add(myNewCard);
    navView.getLayout().getAnimation().enable();
    But while the content doesn't animate, the navigationbar animation remain active.

Thread Participants: 1

Tags for this Thread