1. #1
    Sencha User elwhiz's Avatar
    Join Date
    Apr 2009
    Posts
    28
    Vote Rating
    0
    elwhiz is on a distinguished road

      0  

    Default Carousel preview of next and previous cards / Padded Carousel

    Carousel preview of next and previous cards / Padded Carousel


    Hi,

    I need help or hints on how to make carousel cards previewed / padded to view the next and previous cards.

    I have attached a mock-up on what I want to do.

    I have achieved this on my previous ST1 project by modifying the functions in the Carousel and creating my own Carousel Card layout. But on ST2, the Carousel source code is very different and it seems that I need to track and understand a lot of component hierarchies related to carousel in order to do this.

    Thanks in advance for the help.
    carousel.jpg
    Last edited by elwhiz; 27 Feb 2012 at 7:51 AM. Reason: attached image

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,207
    Vote Rating
    856
    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


    The non active items are going to be hidden and you will need to make sure they are positioned appropriately.
    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
    Sep 2012
    Posts
    9
    Vote Rating
    0
    spirosdi is on a distinguished road

      0  

    Default


    are there any approaches to the desired result? i am looking for the same

  4. #4
    Sencha User sandroqz's Avatar
    Join Date
    Jan 2013
    Posts
    2
    Vote Rating
    0
    sandroqz is on a distinguished road

      0  

    Default


    Hello, elwhiz!

    Did you find out how to achieve this?

    Thank you!

  5. #5
    Touch Premium Member BostonMerlin's Avatar
    Join Date
    Aug 2010
    Location
    Boston
    Posts
    522
    Vote Rating
    41
    BostonMerlin has a spectacular aura about BostonMerlin has a spectacular aura about BostonMerlin has a spectacular aura about

      0  

    Default


    A typical complaint we get from customers using these carousels is that they didn't know you could swipe or what those dots at the bottom meant. Indicators on the sides as mentioned by the OP are on my list of to-dos. Trello.com does this with their iOS app. Very effective.

    John

  6. #6
    Sencha User
    Join Date
    Jun 2012
    Posts
    1
    Vote Rating
    0
    barrettbreshears is on a distinguished road

      0  

    Default show previous/ next preview

    show previous/ next preview


    I found that setting the carousel to 90% of the parent component and center the carousel, and then set the overflow to visible has worked well for me.

    Code:
    {
              xtype:'container',
              cls:'carousel_container',
              layout:{
                type:'vbox',
                align:'center',
                pack:'center'
              },
              items:[
                {
                  xtype:'carousel',
                  name:'OrgChart',
                  hidden:true,
                  height:150,
                  width:'90%',
                  cls:'accordion_carousel',
                  items:[
                        {
                          html:'screen 1',
                        },
                        {
                          html:'screen 2'
                        },
                        {
                          html:'screen 3'
                        }
                        
                  ]
                },
              ]
            },
    HTML Code:
    .accordion_carousel{
      background-color:#e8e8e8;
      overflow:visible;
    }
    
    
    .carousel_container{
      background-color:#e8e8e8;
    }