public/javascripts/yui/carousel/carousel-debug.js
function (o) {
            var carousel   = this,
                carouselEl = carousel._carouselEl,
                itemsTable = carousel._itemsTable,
                pos        = o.pos,
                item       = o.newItem,
                oel        = o.oldItem,
                el;

            el = carousel._createCarouselItem({
                className : item.className,
                styles    : item.styles,
                content   : item.item,
                id        : item.id,
                pos       : pos
            });

            if(el && oel) {
                Event.purgeElement(oel, true);
                carouselEl.replaceChild(el, Dom.get(oel.id));
                if (!JS.isUndefined(itemsTable.loading[pos])) {
                    itemsTable.numItems++;
                    delete itemsTable.loading[pos];
                }
            }
            // TODO: should we add the item if oel is undefined?

            if (!carousel._hasRendered) {
                carousel._refreshUi();
            }

            carousel._syncUiItems();
        }
function (o) {
            var carousel   = this,
                carouselEl = carousel._carouselEl,
                itemsTable = carousel._itemsTable,
                pos        = o.pos,
                item       = o.newItem,
                oel        = o.oldItem,
                el;

            el = carousel._createCarouselItem({
                className : item.className,
                styles    : item.styles,
                content   : item.item,
                id        : item.id,
                pos       : pos
            });

            if(el && oel) {
                Event.purgeElement(oel, true);
                carouselEl.replaceChild(el, Dom.get(oel.id));
                if (!JS.isUndefined(itemsTable.loading[pos])) {
                    itemsTable.numItems++;
                    delete itemsTable.loading[pos];
                }
            }
            // TODO: should we add the item if oel is undefined?

            if (!carousel._hasRendered) {
                carousel._refreshUi();
            }

            carousel._syncUiItems();
        }
function ( o ) { var carousel = this , carouselEl = carousel . _carouselEl , itemsTable = carousel . _itemsTable , pos = o . pos , item = o . newItem , oel = o . oldItem , el ; el = carousel . _createCarouselItem ( { className : item . className , styles : item . styles , content : item . item , id : item . id , pos : pos } ) ; if ( el && oel ) { Event . purgeElement ( oel , true ) ; carouselEl . replaceChild ( el , Dom . get ( oel . id ) ) ; if ( ! JS . isUndefined ( itemsTable . loading [ pos ] ) ) { itemsTable . numItems ++ ; delete itemsTable . loading [ pos ] ; } } // TODO: should we add the item if oel is undefined? if ( ! carousel . _hasRendered ) { carousel . _refreshUi ( ) ; } carousel . _syncUiItems ( ) ; }
Synchronize and redraw the UI after an item is replaced.

@method _syncUiForItemReplace
@protected
Synchronize and redraw the UI after an item is replaced .