1. #1
    Sencha User
    Join Date
    Jan 2012
    Posts
    61
    Vote Rating
    0
    Answers
    1
    msweltzdk is on a distinguished road

      0  

    Default Unanswered: Views in a panel with card layout, stacking.

    Unanswered: Views in a panel with card layout, stacking.


    I have a carousel that is dynamically being fed views for cards. Which works fine. I want to remove the swiping functionality but still have indexing to move between the different cards.

    If I take the current view configered as a carousel and change the extend from Ext.Carousel to Ext.Panel with layout defined as 'card', all the views in the former carousel are stacked on top of each other.

    I have tried defining the items before hand, thinking that the dynamically added views were simply added to the panel instead of being added as a card. What causes this, and how can I achieve the card layout with the possibility of setting the activeitem (possibly with support of the activeitemchange event), without the swiping functionality?

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    St. Louis, MO
    Posts
    33,599
    Vote Rating
    434
    Answers
    3102
    mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of

      0  

    Default


    If they are items of Ext.Panel with card layout everything should be fine. Are there any errors being thrown?
    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.

  3. #3
    Sencha User
    Join Date
    Jan 2012
    Posts
    61
    Vote Rating
    0
    Answers
    1
    msweltzdk is on a distinguished road

      0  

    Default


    So to make a card layout in a panel I need the Panel to have its layout defined as card and all the nested items defined as card as well? Or am I misunderstanding something?

    The error in this case is that all the views are put on top of each other, like where they 5 pieces of paper put in a pile.