1. #1
    Sencha User
    Join Date
    Apr 2012
    Posts
    11
    Vote Rating
    0
    ekf is on a distinguished road

      0  

    Default Unanswered: Weird carousel behavior

    Unanswered: Weird carousel behavior


    Take a look at this:

    http://www.senchafiddle.com/#2ylf6

    It is a carousel with one really wide item (overflowing) and two empty items. I would expect (and I would like) to see "Three" when I swipe to the third item but instead I see "Two" and it takes a couple tries to swipe back. I suspect this is because the wide item is outside of the buffer zone at this point so it is getting unloaded. Is there a way to get this to behave the way I want it to?

    Thanks.

    Edit- I should mention that I'm trying to get this to work with a single item with arbitrarily many columns, each of which is as wide as the carousel itself. You should be able to swipe between the columns as if they were individual carousel items.

    Edit 2- I figured it out. I just use setBufferSize() to ensure that the buffer size will always be larger than the number of items. A bit hackish, but it works.

  2. #2
    Sencha User jerome76's Avatar
    Join Date
    Apr 2012
    Location
    New Jersey
    Posts
    1,149
    Vote Rating
    99
    Answers
    132
    jerome76 is just really nice jerome76 is just really nice jerome76 is just really nice jerome76 is just really nice jerome76 is just really nice

      0  

    Default


    That is very weird. I was looking at it earlier but got distracted with work so I forgot to post on this. I noticed your second edit, but I will keep looking into this to find if there are alternatives or solutions.

  3. #3
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,549
    Vote Rating
    873
    Answers
    3567
    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 swipe between the columns and not the items in the Carousel? I'm not sure why, if the widths are 100% why not just have them as items of the Carousel then.

    It is true that the Carousel will only have max 3 items (by default using the bufferSize config) rendered at any one time, this is to combat performance issues.
    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.

  4. #4
    Sencha User
    Join Date
    Apr 2012
    Posts
    11
    Vote Rating
    0
    ekf is on a distinguished road

      0  

    Default


    The reason was because I had a bunch of text that I needed to break up into pages. Rather than figure out how to break up the text into carousel items, I set the column width to the width of the carousel then added dummy items so I could scroll between the columns.

Thread Participants: 2