Creates correct Tile Styler subtype based on rowHeight passed in by user
(rowHeight: string)
| 145 | |
| 146 | /** Creates correct Tile Styler subtype based on rowHeight passed in by user */ |
| 147 | private _setTileStyler(rowHeight: string): void { |
| 148 | if (this._tileStyler) { |
| 149 | this._tileStyler.reset(this); |
| 150 | } |
| 151 | |
| 152 | if (rowHeight === MAT_FIT_MODE) { |
| 153 | this._tileStyler = new FitTileStyler(); |
| 154 | } else if (rowHeight && rowHeight.indexOf(':') > -1) { |
| 155 | this._tileStyler = new RatioTileStyler(rowHeight); |
| 156 | } else { |
| 157 | this._tileStyler = new FixedTileStyler(rowHeight); |
| 158 | } |
| 159 | } |
| 160 | |
| 161 | /** Computes and applies the size and position for all children grid tiles. */ |
| 162 | private _layoutTiles(): void { |
no test coverage detected