public/javascripts/yui/carousel/carousel-debug.js
function (clip, attr) {
            var carousel = this,
                config   = carousel.CONFIG,
                cssClass = carousel.CLASSES,
                isVertical,
                rows,
                cols,
                size;

            isVertical = carousel.get("isVertical");
            rows       = carousel._rows;
            cols       = carousel._cols;
            clip       = clip || carousel._clipEl;
            attr       = attr || (isVertical ? "height" : "width");
            size       = parseFloat(Dom.getStyle(clip, attr), 10);

            size = JS.isNumber(size) ? size : 0;

            if (isVertical) {
                size += getDimensions(carousel._carouselEl, "height") +
                        getStyle(carousel._navEl, "height");
            } else {
                size += getDimensions(carousel._carouselEl, "width");
            }

            if (!isVertical) {
                if (size < config.HORZ_MIN_WIDTH) {
                    size = config.HORZ_MIN_WIDTH;
                    carousel.addClass(cssClass.MIN_WIDTH);
                }
            }
            carousel.setStyle(attr,  size + "px");

            // Additionally the width of the container should be set for
            // the vertical Carousel
            if (isVertical) {
                size = getCarouselItemSize.call(carousel, "width");
                if(cols) {
                    size = size * cols;
                }
                Dom.setStyle(carousel._carouselEl, "width", size + "px");// Bug fix for vertical carousel (goes in conjunction with .yui-carousel-element {... 3200px removed from styles), and allows for multirows in IEs).
                if (size < config.VERT_MIN_WIDTH) {
                    size = config.VERT_MIN_WIDTH;
                    carousel.addClass(cssClass.MIN_WIDTH);// set a min width on vertical carousel, don't see why this shouldn't always be set...
                }
                carousel.setStyle("width",  size + "px");
            } else {
                if(rows) {
                    size = getCarouselItemSize.call(carousel, "height");
                    size = size * rows;
                    Dom.setStyle(carousel._carouselEl, "height", size + "px");
                }
            }
        }
function (clip, attr) {
            var carousel = this,
                config   = carousel.CONFIG,
                cssClass = carousel.CLASSES,
                isVertical,
                rows,
                cols,
                size;

            isVertical = carousel.get("isVertical");
            rows       = carousel._rows;
            cols       = carousel._cols;
            clip       = clip || carousel._clipEl;
            attr       = attr || (isVertical ? "height" : "width");
            size       = parseFloat(Dom.getStyle(clip, attr), 10);

            size = JS.isNumber(size) ? size : 0;

            if (isVertical) {
                size += getDimensions(carousel._carouselEl, "height") +
                        getStyle(carousel._navEl, "height");
            } else {
                size += getDimensions(carousel._carouselEl, "width");
            }

            if (!isVertical) {
                if (size < config.HORZ_MIN_WIDTH) {
                    size = config.HORZ_MIN_WIDTH;
                    carousel.addClass(cssClass.MIN_WIDTH);
                }
            }
            carousel.setStyle(attr,  size + "px");

            // Additionally the width of the container should be set for
            // the vertical Carousel
            if (isVertical) {
                size = getCarouselItemSize.call(carousel, "width");
                if(cols) {
                    size = size * cols;
                }
                Dom.setStyle(carousel._carouselEl, "width", size + "px");// Bug fix for vertical carousel (goes in conjunction with .yui-carousel-element {... 3200px removed from styles), and allows for multirows in IEs).
                if (size < config.VERT_MIN_WIDTH) {
                    size = config.VERT_MIN_WIDTH;
                    carousel.addClass(cssClass.MIN_WIDTH);// set a min width on vertical carousel, don't see why this shouldn't always be set...
                }
                carousel.setStyle("width",  size + "px");
            } else {
                if(rows) {
                    size = getCarouselItemSize.call(carousel, "height");
                    size = size * rows;
                    Dom.setStyle(carousel._carouselEl, "height", size + "px");
                }
            }
        }
function ( clip , attr ) { var carousel = this , config = carousel . CONFIG , cssClass = carousel . CLASSES , isVertical , rows , cols , size ; isVertical = carousel . get ( "isVertical" ) ; rows = carousel . _rows ; cols = carousel . _cols ; clip = clip || carousel . _clipEl ; attr = attr || ( isVertical ? "height" : "width" ) ; size = parseFloat ( Dom . getStyle ( clip , attr ) , 10 ) ; size = JS . isNumber ( size ) ? size : 0 ; if ( isVertical ) { size += getDimensions ( carousel . _carouselEl , "height" ) + getStyle ( carousel . _navEl , "height" ) ; } else { size += getDimensions ( carousel . _carouselEl , "width" ) ; } if ( ! isVertical ) { if ( size < config . HORZ_MIN_WIDTH ) { size = config . HORZ_MIN_WIDTH ; carousel . addClass ( cssClass . MIN_WIDTH ) ; } } carousel . setStyle ( attr , size + "px" ) ; // Additionally the width of the container should be set for // the vertical Carousel if ( isVertical ) { size = getCarouselItemSize . call ( carousel , "width" ) ; if ( cols ) { size = size * cols ; } Dom . setStyle ( carousel . _carouselEl , "width" , size + "px" ) ; // Bug fix for vertical carousel (goes in conjunction with .yui-carousel-element {... 3200px removed from styles), and allows for multirows in IEs). if ( size < config . VERT_MIN_WIDTH ) { size = config . VERT_MIN_WIDTH ; carousel . addClass ( cssClass . MIN_WIDTH ) ; // set a min width on vertical carousel, don't see why this shouldn't always be set... } carousel . setStyle ( "width" , size + "px" ) ; } else { if ( rows ) { size = getCarouselItemSize . call ( carousel , "height" ) ; size = size * rows ; Dom . setStyle ( carousel . _carouselEl , "height" , size + "px" ) ; } } }
Set the container size.

@method _setContainerSize
@param clip {HTMLElement} The clip container element.
@param attr {String} Either set the height or width.
@protected
Set the container size .