It is not a great idea to change the wink elements directly; for one, it is difficult to upgrade to stay in-sync as wink advances. However, that is less difficult sometimes and perhaps an ok place for you to start.
The carousel’s “auto mode” uses the private method ‘_startAutoPlay’. To continuously cycle, you can replace this whole method with this line of code:
However this is not exactly what I had in mind. What I want to do is show the first node right after the last one. If I for example have 3 nodes I want it to show 1, 2, 3, 1, 2, 3,… and so on. And if I show 3 items all the time and start with 1, I will show 1 in the middle and node3 to the left and node2 to the right. Still think that’s possible by just editing the carousel.js?
Been working on it all day now and I must say it’s just what I needed. Very nice
Found one strange thing with this new script that I can’t really find an explanation for. On iPhone 4 the script takes some extra time on the first switch. Everything gets loaded but the first switch (from 1 to 2 or whatever) takes 1-2 sec. After the first switch everything runs smoothly. It’s like a small hickup I don’t see this on Android. Tried on both 2.2 and 2.3 and all switch transitions including the first are the same.
Any idea what might cause this? Also the hickup time increases when I add more items. 10 items is like 1-2 sec and 30 is 2-3.5 sec.
Got me really puzzled this one :p Would be nice to know if anyone seen this befor.
Found a quick fix for the iPhone delay problem. I start the carousel at the index I want +1. Then go one step left at the end of the init(). The step left wakes up the carousel befor everything get loaded and when the pages is loaded everything works great
Also I made a kinda nice (for mobile) 3d style carousel using two of this circular ones. One big infront of a smaller one. The one in the back goes in the oposite direction of the front one. Makes a kinda nice effect and it so much faster than any other mobile carousel!