Computes and applies the size and position for all children grid tiles.
()
| 160 | |
| 161 | /** Computes and applies the size and position for all children grid tiles. */ |
| 162 | private _layoutTiles(): void { |
| 163 | if (!this._tileCoordinator) { |
| 164 | this._tileCoordinator = new TileCoordinator(); |
| 165 | } |
| 166 | |
| 167 | const tracker = this._tileCoordinator; |
| 168 | const tiles = this._tiles.filter(tile => !tile._gridList || tile._gridList === this); |
| 169 | const direction = this._dir ? this._dir.value : 'ltr'; |
| 170 | |
| 171 | this._tileCoordinator.update(this.cols, tiles); |
| 172 | this._tileStyler.init(this.gutterSize, tracker, this.cols, direction); |
| 173 | |
| 174 | tiles.forEach((tile, index) => { |
| 175 | const pos = tracker.positions[index]; |
| 176 | this._tileStyler.setStyle(tile, pos.row, pos.col); |
| 177 | }); |
| 178 | |
| 179 | this._setListStyle(this._tileStyler.getComputedHeight()); |
| 180 | } |
| 181 | |
| 182 | /** Sets style on the main grid-list element, given the style name and value. */ |
| 183 | _setListStyle(style: [string, string | null] | null): void { |
no test coverage detected