B2G/gaia/apps/homescreen/js/dragdrop.js
/*
   * It's performed when the draggable element is moving
   *
   * @param {Object} DOMElement behind draggable icon
   */
It's performed when the draggable element is moving
@param {Object} DOMElement behind draggable icon
It ' s performed when the draggable element is moving @param { Object } DOMElement behind draggable icon
function onMove(evt) {
    var x = cx = getTouch(evt).pageX;
    var y = cy = getTouch(evt).pageY;
    window.mozRequestAnimationFrame(move);
    var page = getPage();
    if (isDisabledDrag || !page.ready) {
      if (overlapingTimeout !== null) {
        clearTimeout(overlapingTimeout);
        overlapingTimeout = null;
      }
      return;
    }
    var newOverlapElem = overlapElem;
    if (!newOverlapElem) {
      return;
    }
    if (overlapElem.classList.contains('page')) {
      newOverlapElem = document.elementFromPoint(x, y);
    } else {
      var rectObject = overlapElem.getBoundingClientRect();
      if (overlapElem.classList.contains('page') ||
          x < rectObject.left || x > rectObject.right ||
          y < rectObject.top || y > rectObject.bottom) {
        newOverlapElem = document.elementFromPoint(x, y);
      }
    }
    if (newOverlapElem) {
      overlapElem = newOverlapElem;
      handleMove(page, x, y);
    }
  }
function onMove ( evt ) { var x = cx = getTouch ( evt ) . pageX ; var y = cy = getTouch ( evt ) . pageY ; window . mozRequestAnimationFrame ( move ) ; var page = getPage ( ) ; if ( isDisabledDrag || ! page . ready ) { if ( overlapingTimeout !== null ) { clearTimeout ( overlapingTimeout ) ; overlapingTimeout = null ; } return ; } var newOverlapElem = overlapElem ; if ( ! newOverlapElem ) { return ; } if ( overlapElem . classList . contains ( 'page' ) ) { newOverlapElem = document . elementFromPoint ( x , y ) ; } else { var rectObject = overlapElem . getBoundingClientRect ( ) ; if ( overlapElem . classList . contains ( 'page' ) || x < rectObject . left || x > rectObject . right || y < rectObject . top || y > rectObject . bottom ) { newOverlapElem = document . elementFromPoint ( x , y ) ; } } if ( newOverlapElem ) { overlapElem = newOverlapElem ; handleMove ( page , x , y ) ; } }
It's performed when the draggable element is moving
 @param {Object} DOMElement behind draggable icon
It ' s performed when the draggable element is moving @param { Object } DOMElement behind draggable icon
// We are on the grid but not icon // Avoid calling document.elementFromPoint if we are over the same icon // elementFromPoint can return null in some situations, most notably when // the user's finger goes below the dock, on the soft buttons