dist/crocodoc.viewer.js
function ghostScroll() {
        clearTimeout(scrollendTID);
        if (ghostScrollStart === null) {
            ghostScrollStart = new Date().getTime();
        }
        if (new Date().getTime() - ghostScrollStart > GHOST_SCROLL_TIMEOUT) {
            handleScrollEnd();
            return;
        }
        fireScroll();
        scrollendTID = setTimeout(ghostScroll, GHOST_SCROLL_INTERVAL);
    }
function ghostScroll() {
        clearTimeout(scrollendTID);
        if (ghostScrollStart === null) {
            ghostScrollStart = new Date().getTime();
        }
        if (new Date().getTime() - ghostScrollStart > GHOST_SCROLL_TIMEOUT) {
            handleScrollEnd();
            return;
        }
        fireScroll();
        scrollendTID = setTimeout(ghostScroll, GHOST_SCROLL_INTERVAL);
    }
function ghostScroll ( ) { clearTimeout ( scrollendTID ) ; if ( ghostScrollStart === null ) { ghostScrollStart = new Date ( ) . getTime ( ) ; } if ( new Date ( ) . getTime ( ) - ghostScrollStart > GHOST_SCROLL_TIMEOUT ) { handleScrollEnd ( ) ; return ; } fireScroll ( ) ; scrollendTID = setTimeout ( ghostScroll , GHOST_SCROLL_INTERVAL ) ; }
Fire fake scroll events.
iOS doesn't fire events during the 'momentum' part of scrolling
so this is used to fake these events until the page stops moving.
@returns {void}
@private
Fire fake scroll events . iOS doesn t fire events during the momentum part of scrolling so this is used to fake these events until the page stops moving .