apps/system/js/task_manager.js
/**
   * Update the card positions and layout.
   * Called in response to window resize and stack changes.
   */
Update the card positions and layout.
Called in response to window resize and stack changes.
Update the card positions and layout . Called in response to window resize and stack changes .
updateLayout(initial) {
    this.cardWidth = window.innerWidth / 2;
    this.cardHeight = window.innerHeight / 2;
    var count = this.stack.length;
    var margins = window.innerWidth - this.cardWidth;
    var cardStripWidth = this.cardWidth * count +
                         this.CARD_GUTTER * (count - 1);
    var contentWidth = margins + Math.max(this.cardWidth, cardStripWidth);
    this.stack.forEach((app, index) => {
      var card = this.appToCardMap.get(app);
      var left = (margins / 2) + this.indexToOffset(index);
      card.translate({ x: left + 'px' });
    });
    this.cardsList.style.width = contentWidth + 'px';
    this.updateScrollPosition(initial);
  }
updateLayout ( initial ) { this . cardWidth = window . innerWidth / 2 ; this . cardHeight = window . innerHeight / 2 ; var count = this . stack . length ; var margins = window . innerWidth - this . cardWidth ; var cardStripWidth = this . cardWidth * count + this . CARD_GUTTER * ( count - 1 ) ; var contentWidth = margins + Math . max ( this . cardWidth , cardStripWidth ) ; this . stack . forEach ( ( app , index ) => { var card = this . appToCardMap . get ( app ) ; var left = ( margins / 2 ) + this . indexToOffset ( index ) ; card . translate ( { x : left + 'px' } ) ; } ) ; this . cardsList . style . width = contentWidth + 'px' ; this . updateScrollPosition ( initial ) ; }
Update the card positions and layout.
Update the card positions and layout .