code: function layoutDelegate(tilesInvalidated) {
        var tiles = getTileElements();
        var props = {
          tileSpans: getTileSpans(tiles),
          colCount: getColumnCount(),
          rowMode: getRowMode(),
          rowHeight: getRowHeight(),
          gutter: getGutter()
        };
  
        if (!tilesInvalidated && angular.equals(props, lastLayoutProps)) {
          return;
        }
  
        var performance =
          $mdGridLayout(props.colCount, props.tileSpans, tiles)
            .map(function(tilePositions, rowCount) {
              return {
                grid: {
                  element: element,
                  style: getGridStyle(props.colCount, rowCount,
                      props.gutter, props.rowMode, props.rowHeight)
                },
                tiles: tilePositions.map(function(ps, i) {
                  return {
                    element: angular.element(tiles[i]),
                    style: getTileStyle(ps.position, ps.spans,
                        props.colCount, rowCount,
                        props.gutter, props.rowMode, props.rowHeight)
                  };
                })
              };
            })
            .reflow()
            .performance();
  
        // Report layout
        scope.mdOnLayout({
          $event: {
            performance: performance
          }
        });
  
        lastLayoutProps = props;
      }
docs: Invokes the layout engine, and uses its results to lay out our
  tile elements.
  
  @param {boolean} tilesInvalidated Whether tiles have been
  added/removed/moved since the last layout. This is to avoid situations
  where tiles are replaced with properties identical to their removed
  counterparts.