1. #1
    Sencha User
    Join Date
    Mar 2012
    Posts
    29
    Vote Rating
    0
    stevenlangbroek is on a distinguished road

      0  

    Default Unanswered: Sliding out a Panel

    Unanswered: Sliding out a Panel


    Hey guys,

    Since there aren't alot of tutorials for v2 yet, I'm just learning as I go based on the API-documentation, but unfortunately I'm a little fuzzy on some things. For example: I've built an app with a title-bar with some buttons, and below that an hbox-panel with 2 items. I want to slide the left-most panel out of screen upon clicking a button in the top-bar, but I'm not sure how to write the handler for this... Anyone care to help me out?

    Code:
    ui: 'back',
    text: 'Terug',
    handler: function(){
        // what goes here?
                    
    }
    Thanks!

    Steven

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,056
    Answers
    3495
    Vote Rating
    850
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    So you want to use Ext.Anim to slide the panel out?
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    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 in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Mar 2012
    Posts
    29
    Vote Rating
    0
    stevenlangbroek is on a distinguished road

      0  

    Default


    Uh yeah... I think so... I tried that but when I use 'toolbar' (which I'd defined as the ID of the element I wanna slide out) I get Uncaught TypeError: Cannot call method 'run' of undefined in my DOM-inspector... Am I missing something here selector-wise?

  4. #4
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,056
    Answers
    3495
    Vote Rating
    850
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Have you loaded Ext.Anim?
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    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 in print!

    When posting code, please use BBCode's CODE tags.

  5. #5
    Sencha User
    Join Date
    Mar 2012
    Posts
    29
    Vote Rating
    0
    stevenlangbroek is on a distinguished road

      0  

    Default


    Lol, ok thnx for that (no I didn't). I've now loaded it in requires for my Ext.Application, but still no dice... error is gone though...

  6. #6
    Sencha User
    Join Date
    Mar 2012
    Posts
    29
    Vote Rating
    0
    stevenlangbroek is on a distinguished road

      0  

    Default


    Any thoughts on this? Here's my code:

    Code:
    ui: 'back',
    text: 'Terug',
    handler: function(){
        
        Ext.Anim.run('toolbar', 'slide', {
            out: true,
            autoClear: false
        });
                    
    }

Thread Participants: 1

Tags for this Thread