function _snapToPage() {

        // Check whether pagination is active
        if (!this.options.paginated ||
            this._scroll.scrollForceCount || //don't paginate while moving
            (this._scroll.springPosition !== undefined)) {
            return;
        }

        // When the energy is below the thresshold, paginate to the current page
        var item;
        switch (this.options.paginationMode) {
            case PaginationMode.SCROLL:
                if (!this.options.paginationEnergyThreshold || (Math.abs(this._scroll.particle.getEnergy()) <= this.options.paginationEnergyThreshold)) {
                    item = this.options.alignment ? this.getLastVisibleItem() : this.getFirstVisibleItem();
                    if (item && item.renderNode) {
                        this.goToRenderNode(item.renderNode);
                    }
                }
                break;
            case PaginationMode.PAGE:
                item = this.options.alignment ? this.getLastVisibleItem() : this.getFirstVisibleItem();
                if (item && item.renderNode) {
                    this.goToRenderNode(item.renderNode);
                }
                break;
        }
    }
function _snapToPage() {

        
        if (!this.options.paginated ||
            this._scroll.scrollForceCount || 
            (this._scroll.springPosition !== undefined)) {
            return;
        }

        
        var item;
        switch (this.options.paginationMode) {
            case PaginationMode.SCROLL:
                if (!this.options.paginationEnergyThreshold || (Math.abs(this._scroll.particle.getEnergy()) <= this.options.paginationEnergyThreshold)) {
                    item = this.options.alignment ? this.getLastVisibleItem() : this.getFirstVisibleItem();
                    if (item && item.renderNode) {
                        this.goToRenderNode(item.renderNode);
                    }
                }
                break;
            case PaginationMode.PAGE:
                item = this.options.alignment ? this.getLastVisibleItem() : this.getFirstVisibleItem();
                if (item && item.renderNode) {
                    this.goToRenderNode(item.renderNode);
                }
                break;
        }
    }
function _snapToPage ( ) { // Check whether pagination is active if ( ! this . options . paginated || this . _scroll . scrollForceCount || //don't paginate while moving ( this . _scroll . springPosition !== undefined ) ) { return ; } // When the energy is below the thresshold, paginate to the current page var item ; switch ( this . options . paginationMode ) { case PaginationMode . SCROLL : if ( ! this . options . paginationEnergyThreshold || ( Math . abs ( this . _scroll . particle . getEnergy ( ) ) <= this . options . paginationEnergyThreshold ) ) { item = this . options . alignment ? this . getLastVisibleItem ( ) : this . getFirstVisibleItem ( ) ; if ( item && item . renderNode ) { this . goToRenderNode ( item . renderNode ) ; } } break ; case PaginationMode . PAGE : item = this . options . alignment ? this . getLastVisibleItem ( ) : this . getFirstVisibleItem ( ) ; if ( item && item . renderNode ) { this . goToRenderNode ( item . renderNode ) ; } break ; } }
Snaps to a page when pagination is enabled.
Snaps to a page when pagination is enabled .