Results 1 to 4 of 4

Thread: setActiveItem animation doesnt work

  1. #1
    Sencha User
    Join Date
    Apr 2012
    Posts
    6
    Vote Rating
    0
      0  

    Default setActiveItem animation doesnt work

    Hello,

    In Sencha Touch 2, I use this code snippet in my controller:


    this.control({
    '#test_button': {
    tap: function () {
    var root_c = Ext.getCmp("main_container");
    root_c.setActiveItem(
    1, {type:'slide', direction: 'left'}
    );
    }
    }
    });

    It works nicely, but it switches only the "default way", not the "sliding way". Can anyone help, why?Thanks in advance,
    R

    Edited: Sorry about the bad code formatting

  2. #2
    Sencha User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,050
    Vote Rating
    1381
      1  

    Default

    Check out animateActiveItem instead of setActiveItem. setActiveItem in ST2 doesn't support animation.
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Frontend Engineer
    ________________
    Need any sort of Ext JS help? Modus Create is here to help!

    Check out my GitHub:
    https://github.com/mitchellsimoens

  3. #3
    Sencha User
    Join Date
    Apr 2012
    Posts
    6
    Vote Rating
    0
      0  

    Default

    It works like a charm
    Thank you for your help!

    R

  4. #4
    Sencha User AkashSaikia's Avatar
    Join Date
    Oct 2011
    Location
    Mumbai, India
    Posts
    33
    Vote Rating
    0
      0  

    Default

    I had the same problem, but solved now because of the animateActiveItem Thanks.

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
  •