* Gets The horizontal or vertical position of a tile, e.g., the 'top' or 'left' property value. * @param offset Number of tiles that have already been rendered in the row/column. * @param baseSize Base size of a 1x1 tile (as computed in getBaseTileSize). * @return Position of the tile as a
(baseSize: string, offset: number)
| 74 | * @return Position of the tile as a CSS calc() expression. |
| 75 | */ |
| 76 | getTilePosition(baseSize: string, offset: number): string { |
| 77 | // The position comes the size of a 1x1 tile plus gutter for each previous tile in the |
| 78 | // row/column (offset). |
| 79 | return offset === 0 ? '0' : calc(`(${baseSize} + ${this._gutterSize}) * ${offset}`); |
| 80 | } |
| 81 | |
| 82 | /** |
| 83 | * Gets the actual size of a tile, e.g., width or height, taking rowspan or colspan into account. |