21 Aug 2012 5:39 PM #1
Unanswered: Weird carousel behavior
Take a look at this:
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?
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.
22 Aug 2012 3:12 PM #2
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.
23 Aug 2012 6:25 AM #3
- Join Date
- Mar 2007
- Gainesville, FL
- Vote Rating
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 Software Engineer
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
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 firstname.lastname@example.org
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.
23 Aug 2012 9:06 AM #4
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.