public/javascripts/yui/carousel/carousel-debug.js
function syncPagerUi(page) {
        var carousel = this, numPages, numVisible;

        // Don't do anything if the Carousel is not rendered
        if (!carousel._hasRendered) {
            return;
        }

        numVisible = carousel.get("numVisible");

        if (!JS.isNumber(page)) {
            page = Math.floor(carousel.get("selectedItem") / numVisible);
        }

        numPages = Math.ceil(carousel.get("numItems") / numVisible);

        carousel._pages.num = numPages;
        carousel._pages.cur = page;

        if (numPages > carousel.CONFIG.MAX_PAGER_BUTTONS) {
            carousel._updatePagerMenu();
        } else {
            carousel._updatePagerButtons();
        }
    }
function syncPagerUi(page) {
        var carousel = this, numPages, numVisible;

        // Don't do anything if the Carousel is not rendered
        if (!carousel._hasRendered) {
            return;
        }

        numVisible = carousel.get("numVisible");

        if (!JS.isNumber(page)) {
            page = Math.floor(carousel.get("selectedItem") / numVisible);
        }

        numPages = Math.ceil(carousel.get("numItems") / numVisible);

        carousel._pages.num = numPages;
        carousel._pages.cur = page;

        if (numPages > carousel.CONFIG.MAX_PAGER_BUTTONS) {
            carousel._updatePagerMenu();
        } else {
            carousel._updatePagerButtons();
        }
    }
function syncPagerUi ( page ) { var carousel = this , numPages , numVisible ; // Don't do anything if the Carousel is not rendered if ( ! carousel . _hasRendered ) { return ; } numVisible = carousel . get ( "numVisible" ) ; if ( ! JS . isNumber ( page ) ) { page = Math . floor ( carousel . get ( "selectedItem" ) / numVisible ) ; } numPages = Math . ceil ( carousel . get ( "numItems" ) / numVisible ) ; carousel . _pages . num = numPages ; carousel . _pages . cur = page ; if ( numPages > carousel . CONFIG . MAX_PAGER_BUTTONS ) { carousel . _updatePagerMenu ( ) ; } else { carousel . _updatePagerButtons ( ) ; } }
Synchronize and redraw the Pager UI if necessary.

@method syncPagerUi
@private
Synchronize and redraw the Pager UI if necessary .