lib/dispatcher.js
function _shouldActivityUpdate(_ref5) {
      var type = _ref5.type;
      var pageX = _ref5.pageX;
      var pageY = _ref5.pageY;

      if (type !== 'mousemove') return true;

      var _stores$fast = stores.fast;
      var lastActive = _stores$fast.lastActive;
      var _stores$fast$lastEven = _stores$fast.lastEvent;
      var x = _stores$fast$lastEven.x;
      var y = _stores$fast$lastEven.y;

      if (typeof pageX === 'undefined' || typeof pageY === 'undefined') return false;
      if (Math.abs(pageX - x) < thresholds.mouse && Math.abs(pageY - y) < thresholds.mouse) return false;

      // SKIP UPDATE IF ITS UNDER THE THRESHOLD MS FROM THE LAST UPDATE
      var elapsedMS = +new Date() - lastActive;
      if (elapsedMS < thresholds.elapsedMS) return false;
      if (process.env.NODE_ENV !== 'production') log.trace('_shouldActivityUpdate: elapsed vs threshold => E[' + elapsedMS + '] >= T[' + thresholds.elapsedMS + '], lastActive => ' + lastActive);
      return true;
    }
function _shouldActivityUpdate(_ref5) {
      var type = _ref5.type;
      var pageX = _ref5.pageX;
      var pageY = _ref5.pageY;

      if (type !== 'mousemove') return true;

      var _stores$fast = stores.fast;
      var lastActive = _stores$fast.lastActive;
      var _stores$fast$lastEven = _stores$fast.lastEvent;
      var x = _stores$fast$lastEven.x;
      var y = _stores$fast$lastEven.y;

      if (typeof pageX === 'undefined' || typeof pageY === 'undefined') return false;
      if (Math.abs(pageX - x) < thresholds.mouse && Math.abs(pageY - y) < thresholds.mouse) return false;

      // SKIP UPDATE IF ITS UNDER THE THRESHOLD MS FROM THE LAST UPDATE
      var elapsedMS = +new Date() - lastActive;
      if (elapsedMS < thresholds.elapsedMS) return false;
      if (process.env.NODE_ENV !== 'production') log.trace('_shouldActivityUpdate: elapsed vs threshold => E[' + elapsedMS + '] >= T[' + thresholds.elapsedMS + '], lastActive => ' + lastActive);
      return true;
    }
function _shouldActivityUpdate ( _ref5 ) { var type = _ref5 . type ; var pageX = _ref5 . pageX ; var pageY = _ref5 . pageY ; if ( type !== 'mousemove' ) return true ; var _stores$fast = stores . fast ; var lastActive = _stores$fast . lastActive ; var _stores$fast$lastEven = _stores$fast . lastEvent ; var x = _stores$fast$lastEven . x ; var y = _stores$fast$lastEven . y ; if ( typeof pageX === 'undefined' || typeof pageY === 'undefined' ) return false ; if ( Math . abs ( pageX - x ) < thresholds . mouse && Math . abs ( pageY - y ) < thresholds . mouse ) return false ; // SKIP UPDATE IF ITS UNDER THE THRESHOLD MS FROM THE LAST UPDATE var elapsedMS = + new Date ( ) - lastActive ; if ( elapsedMS < thresholds . elapsedMS ) return false ; if ( process . env . NODE_ENV !== 'production' ) log . trace ( '_shouldActivityUpdate: elapsed vs threshold => E[' + elapsedMS + '] >= T[' + thresholds . elapsedMS + '], lastActive => ' + lastActive ) ; return true ; }
Detects whether the activity should trigger a redux update
Detects whether the activity should trigger a redux update