public/front/js/New Tab_files/newTab.js
/**
   * We have a overflowed pinned site that we need to re-position so that it's
   * visible again. We try to find a lower-priority cell (empty or containing
   * an unpinned site) that we can move it to.
   * @param aSites The array of sites.
   * @param aCell The drop target cell.
   */
We have a overflowed pinned site that we need to re-position so that it's
visible again. We try to find a lower-priority cell (empty or containing
an unpinned site) that we can move it to.
@param aSites The array of sites.
@param aCell The drop target cell.
We have a overflowed pinned site that we need to re - position so that it ' s visible again . We try to find a lower - priority cell ( empty or containing an unpinned site ) that we can move it to . @param aSites The array of sites . @param aCell The drop target cell .
function DropPreview_repositionOverflowedPinnedSite(aSites, aCell) {
    let index = this._indexOfLowerPrioritySite(aSites, aCell);
    if (index > -1) {
      let cells = gGrid.cells;
      let dropIndex = aCell.index;
      for (let i = index + 1, lastPosition = index; i < aSites.length; i++) {
        if (i != dropIndex) {
          aSites[lastPosition] = aSites[i];
          lastPosition = i;
        }
      }
      aSites.splice(cells.length, 1);
    }
  }
function DropPreview_repositionOverflowedPinnedSite ( aSites , aCell ) { let index = this . _indexOfLowerPrioritySite ( aSites , aCell ) ; if ( index > - 1 ) { let cells = gGrid . cells ; let dropIndex = aCell . index ; for ( let i = index + 1 , lastPosition = index ; i < aSites . length ; i ++ ) { if ( i != dropIndex ) { aSites [ lastPosition ] = aSites [ i ] ; lastPosition = i ; } } aSites . splice ( cells . length , 1 ) ; } }
We have a overflowed pinned site that we need to re-position so that it's
 visible again.
We have a overflowed pinned site that we need to re - position so that it ' s visible again .
// Try to find a lower-priority cell (empty or containing an unpinned site). // Move all pinned cells to their new positions to let the overflowed // site fit into the grid. // Finally, remove the overflowed site from its previous position.