1
1
import { MdGridTile } from './grid-tile' ;
2
2
import { TileCoordinator } from './tile-coordinator' ;
3
3
import { MdGridListBadRatioError } from './grid-list-errors' ;
4
- import { Dir } from '@angular2-material/core/rtl/dir' ;
5
4
6
5
/* Sets the style properties for an individual tile, given the position calculated by the
7
6
* Tile Coordinator. */
@@ -10,18 +9,18 @@ export class TileStyler {
10
9
_rows : number = 0 ;
11
10
_rowspan : number = 0 ;
12
11
_cols : number ;
13
- _dir : Dir ;
12
+ _direction : string ;
14
13
15
14
/** Adds grid-list layout info once it is available. Cannot be processed in the constructor
16
15
* because these properties haven't been calculated by that point.
17
16
* @internal
18
17
* */
19
- init ( _gutterSize : string , tracker : TileCoordinator , cols : number , dir : Dir ) : void {
18
+ init ( _gutterSize : string , tracker : TileCoordinator , cols : number , direction : string ) : void {
20
19
this . _gutterSize = normalizeUnits ( _gutterSize ) ;
21
20
this . _rows = tracker . rowCount ;
22
21
this . _rowspan = tracker . rowspan ;
23
22
this . _cols = cols ;
24
- this . _dir = dir ;
23
+ this . _direction = direction ;
25
24
}
26
25
27
26
/**
@@ -93,7 +92,7 @@ export class TileStyler {
93
92
94
93
// The width and horizontal position of each tile is always calculated the same way, but the
95
94
// height and vertical position depends on the rowMode.
96
- let side = this . _dir . value === 'ltr' ? 'left' : 'right' ;
95
+ let side = this . _direction === 'ltr' ? 'left' : 'right' ;
97
96
tile . setStyle ( side , this . getTilePosition ( baseTileWidth , colIndex ) ) ;
98
97
tile . setStyle ( 'width' , calc ( this . getTileSize ( baseTileWidth , tile . colspan ) ) ) ;
99
98
}
@@ -119,8 +118,8 @@ export class FixedTileStyler extends TileStyler {
119
118
constructor ( public fixedRowHeight : string ) { super ( ) ; }
120
119
121
120
/** @internal */
122
- init ( gutterSize : string , tracker : TileCoordinator , cols : number , dir : Dir ) {
123
- super . init ( gutterSize , tracker , cols , dir ) ;
121
+ init ( gutterSize : string , tracker : TileCoordinator , cols : number , direction : string ) {
122
+ super . init ( gutterSize , tracker , cols , direction ) ;
124
123
this . fixedRowHeight = normalizeUnits ( this . fixedRowHeight ) ;
125
124
}
126
125
0 commit comments