stores/MapStore.js
function calculatePositionDiff(position) {
  if (!_lastDiffPosition) {
    return _lastDiffPosition = position;
  }
  var dx, dy, p1, p2;
  p1 = position;
  p2 = _lastDiffPosition;
  dx = p2.x - p1.x;
  dy = p2.y - p1.y;
  _calcMoveDiffX += dx;
  _calcMoveDiffY += dy;
  _overallMoveDiffY += dy;
  _overallMoveDiffX += dx;
  _lastDiffPosition = position;
}
function calculatePositionDiff(position) {
  if (!_lastDiffPosition) {
    return _lastDiffPosition = position;
  }
  var dx, dy, p1, p2;
  p1 = position;
  p2 = _lastDiffPosition;
  dx = p2.x - p1.x;
  dy = p2.y - p1.y;
  _calcMoveDiffX += dx;
  _calcMoveDiffY += dy;
  _overallMoveDiffY += dy;
  _overallMoveDiffX += dx;
  _lastDiffPosition = position;
}
function calculatePositionDiff ( position ) { if ( ! _lastDiffPosition ) { return _lastDiffPosition = position ; } var dx , dy , p1 , p2 ; p1 = position ; p2 = _lastDiffPosition ; dx = p2 . x - p1 . x ; dy = p2 . y - p1 . y ; _calcMoveDiffX += dx ; _calcMoveDiffY += dy ; _overallMoveDiffY += dy ; _overallMoveDiffX += dx ; _lastDiffPosition = position ; }
position diff methods
position diff methods