public/javascripts/yui/carousel/carousel-debug.js
function (obj) {
            var carousel   = this,
                carouselEl = carousel._carouselEl,
                el, item, num, pos;

            num  = carousel.get("numItems");
            item = obj.item;
            pos  = obj.pos;

            if (item && (el = Dom.get(item.id))) {
                if (el && Dom.isAncestor(carouselEl, el)) {
                    Event.purgeElement(el, true);
                    carouselEl.removeChild(el);
                }

                if (carousel.get("selectedItem") == pos) {
                    pos = pos >= num ? num - 1 : pos;
                }
            } else {
                YAHOO.log("Unable to find item", "warn", WidgetName);
            }

            carousel._syncUiItems();
        }
function (obj) {
            var carousel   = this,
                carouselEl = carousel._carouselEl,
                el, item, num, pos;

            num  = carousel.get("numItems");
            item = obj.item;
            pos  = obj.pos;

            if (item && (el = Dom.get(item.id))) {
                if (el && Dom.isAncestor(carouselEl, el)) {
                    Event.purgeElement(el, true);
                    carouselEl.removeChild(el);
                }

                if (carousel.get("selectedItem") == pos) {
                    pos = pos >= num ? num - 1 : pos;
                }
            } else {
                YAHOO.log("Unable to find item", "warn", WidgetName);
            }

            carousel._syncUiItems();
        }
function ( obj ) { var carousel = this , carouselEl = carousel . _carouselEl , el , item , num , pos ; num = carousel . get ( "numItems" ) ; item = obj . item ; pos = obj . pos ; if ( item && ( el = Dom . get ( item . id ) ) ) { if ( el && Dom . isAncestor ( carouselEl , el ) ) { Event . purgeElement ( el , true ) ; carouselEl . removeChild ( el ) ; } if ( carousel . get ( "selectedItem" ) == pos ) { pos = pos >= num ? num - 1 : pos ; } } else { YAHOO . log ( "Unable to find item" , "warn" , WidgetName ) ; } carousel . _syncUiItems ( ) ; }
Synchronize and redraw the UI after an item is removed.

@method _syncUiForItemAdd
@protected
Synchronize and redraw the UI after an item is removed .