public/front/js/New Tab_files/newTab.js
/**
   * Inserts the currently dragged site into the given array of sites.
   * @param aSites The array of sites to insert into.
   * @param aCell The drop target cell.
   */
Inserts the currently dragged site into the given array of sites.
@param aSites The array of sites to insert into.
@param aCell The drop target cell.
Inserts the currently dragged site into the given array of sites . @param aSites The array of sites to insert into . @param aCell The drop target cell .
function DropPreview_insertDraggedSite(aSites, aCell) {
    let dropIndex = aCell.index;
    let draggedSite = gDrag.draggedSite;
    if (draggedSite) {
      let dragCell = draggedSite.cell;
      let dragIndex = dragCell.index;
      if (dragIndex != dropIndex) {
        aSites.splice(dragIndex, 1);
        aSites.splice(dropIndex, 0, draggedSite);
      }
    } else {
      aSites.splice(dropIndex, 0, null);
    }
  }
function DropPreview_insertDraggedSite ( aSites , aCell ) { let dropIndex = aCell . index ; let draggedSite = gDrag . draggedSite ; if ( draggedSite ) { let dragCell = draggedSite . cell ; let dragIndex = dragCell . index ; if ( dragIndex != dropIndex ) { aSites . splice ( dragIndex , 1 ) ; aSites . splice ( dropIndex , 0 , draggedSite ) ; } } else { aSites . splice ( dropIndex , 0 , null ) ; } }
Inserts the currently dragged site into the given array of sites.
Inserts the currently dragged site into the given array of sites .
// We're currently dragging a site. // Move the dragged site into its new position. // We're handling an external drag item.