dist/scroll-indicator.js
/**
 * Instantiates the ScrollTracker instance.
 * @constructor
 * @param {HTMLElement} element
 */
Instantiates the ScrollTracker instance.
@constructor
@param {HTMLElement} element
Instantiates the ScrollTracker instance . @constructor @param { HTMLElement } element
function ScrollTracker() {
  this._element = window;
  this._emitter = new Emitter();
  _.bindAll(this, '_scrollHandler');
  this._currentPosition = this._getPosition();
  this._throttledHandler = _.throttle(this._scrollHandler, 100);
  this._isBound = false;
}
function ScrollTracker ( ) { this . _element = window ; this . _emitter = new Emitter ( ) ; _ . bindAll ( this , '_scrollHandler' ) ; this . _currentPosition = this . _getPosition ( ) ; this . _throttledHandler = _ . throttle ( this . _scrollHandler , 100 ) ; this . _isBound = false ; }
Instantiates the ScrollTracker instance.
Instantiates the ScrollTracker instance .
// Make sure scrollHandler is called in the context of this object. // Initialize the position. This is used to determine what direction the user // is scrolling in. // Call the scrollHandler at most 10 times per second. // Track whether we are bound to the element's scroll event or not.