View Full Version : [FIXED-104] Carousel.add/dolayout doesn't update scroller bounds

24 Jun 2010, 1:33 AM
In the carousel i got it works first time i .add() to it but 2nd time i do it it fails to use the .next() and .setActiveItem(). It is possible to use touch slide in the carousel and after doing that .next() and .setActiveItem() will also work.

Example of how i do:

var object = {};
for (var i = 0; i < array.length; i++) {
object = new Object(array[i].data);
object.html = tpl.applyTemplate(object);
carousel.add(new Object(playlist[i].data));

carousel.setActiveItem(0, true, true);

After above is done 2nd time .next() and .setActiveItem() will work for the length of 1st time.

I looked a bit in the source and debugged a bit and i can see that it doesn't update the scroller bounds.

Not 100% sure this is a bug or if i missed to do something, but i debugged a bit and looked for available carousel functions there should do the trick.

Edit: if i within the Ext.Carousel.afterLayout add this.scroller.updateBounds(); it does the trick :)

Kind regards
Ronni Rasmussen

24 Jun 2010, 10:24 AM
Thanks for the bug report and debugging!

28 Jun 2010, 1:57 PM
This will be fixed in the next release.