dist/crocodoc.viewer.js
function (page) {
            var state = this.state;
            if (state.currentPage !== page) {
                // page has changed
                state.currentPage = page;
                this.updateVisiblePages();
                scope.broadcast('pagefocus', {
                    page: state.currentPage,
                    numPages: this.numPages,
                    visiblePages: util.extend([], state.visiblePages),
                    fullyVisiblePages: util.extend([], state.fullyVisiblePages)
                });
            } else {
                // still update visible pages!
                this.updateVisiblePages();
            }
        }
function (page) {
            var state = this.state;
            if (state.currentPage !== page) {
                // page has changed
                state.currentPage = page;
                this.updateVisiblePages();
                scope.broadcast('pagefocus', {
                    page: state.currentPage,
                    numPages: this.numPages,
                    visiblePages: util.extend([], state.visiblePages),
                    fullyVisiblePages: util.extend([], state.fullyVisiblePages)
                });
            } else {
                // still update visible pages!
                this.updateVisiblePages();
            }
        }
function ( page ) { var state = this . state ; if ( state . currentPage !== page ) { // page has changed state . currentPage = page ; this . updateVisiblePages ( ) ; scope . broadcast ( 'pagefocus' , { page : state . currentPage , numPages : this . numPages , visiblePages : util . extend ( [ ] , state . visiblePages ) , fullyVisiblePages : util . extend ( [ ] , state . fullyVisiblePages ) } ) ; } else { // still update visible pages! this . updateVisiblePages ( ) ; } }
Set the current page, update the visible pages, and broadcast a
pagefocus  message if the given page is not already the current page
@param {int} page The page number
Set the current page update the visible pages and broadcast a pagefocus message if the given page is not already the current page