MCPcopy Create free account
hub / github.com/angular/components / _setTileStyler

Method _setTileStyler

src/material/grid-list/grid-list.ts:147–159  ·  view source on GitHub ↗

Creates correct Tile Styler subtype based on rowHeight passed in by user

(rowHeight: string)

Source from the content-addressed store, hash-verified

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 {

Callers 2

rowHeightMethod · 0.95
_checkRowHeightMethod · 0.95

Calls 1

resetMethod · 0.65

Tested by

no test coverage detected