PDA

View Full Version : Change Carousel Item with fade animation



squarefan
19 Mar 2012, 10:51 AM
Running into an issue and not quite sure how to solve it.

I am using a normal carousel (no card layout) that behaves as expected. What I want to do is to quick jump to specific items and do that with a 'fade' animation instead of the just the plain jump directly there.

in Touch 1 i used:


setActiveItem(position, 'fade');

which worked great. Looking in the docu I saw that this should be done now with:


animateActiveItem(position, {type: 'fade'})

Unfortunately that doesn't work as well. First for it to work I have to change the layout of the carousel to 'card' which results in flickering and slow/delayed loading of images while going back and forth between the different cards (which wihtout the layout set to card works perfectly fine).
If I don't set the layout to card though, the animation itself will not work.

Is there a way to let the carousel behave normally (slide left/right) and somehow get the same functionality as with setActiveItem in Touch 1 where I can just pass the 'fade' property?

thanks!

mitchellsimoens
19 Mar 2012, 12:17 PM
The carousel has a next and previous methods on it.

squarefan
19 Mar 2012, 9:49 PM
Hi, thanks for the reply.

Unfortuantely thats not exactly what I was looking for. I knew about next/previous but that just brings you to the next/previous slide. What I want to do is having e.g. 15 slides/cards in the carousel jump from no1 to 10 etc. and that jump should be done with a fade animation (as mentioned in my first post I did that with setActiveItem under Touch 1 and that worked great).

Is there anything else I can do?

gkatz
20 Mar 2012, 2:10 AM
in ST2 this can be done via animateActiveItem
http://docs.sencha.com/touch/2-0/#!/api/Ext.carousel.Carousel-method-animateActiveItem

squarefan
20 Mar 2012, 2:15 AM
@gkatz

thanks for your response. As mentioned in my first post there are several issues when using animateActiveItem.

squarefan
14 Oct 2012, 4:58 AM
is there any fix for that yet. 2.0.1.1 seems to be a pretty broken release with several things not working for me and I am looking for a workaround in 2.0.0 for this?

anybody stumbled over this already?

cheers,