11import { MdGridTile } from './grid-tile' ;
22import { TileCoordinator } from './tile-coordinator' ;
33import { MdGridListBadRatioError } from './grid-list-errors' ;
4- import { Dir } from '@angular2-material/core/rtl/dir' ;
54
65/* Sets the style properties for an individual tile, given the position calculated by the
76* Tile Coordinator. */
@@ -10,18 +9,18 @@ export class TileStyler {
109 _rows : number = 0 ;
1110 _rowspan : number = 0 ;
1211 _cols : number ;
13- _dir : Dir ;
12+ _direction : string ;
1413
1514 /** Adds grid-list layout info once it is available. Cannot be processed in the constructor
1615 * because these properties haven't been calculated by that point.
1716 * @internal
1817 * */
19- init ( _gutterSize : string , tracker : TileCoordinator , cols : number , dir : Dir ) : void {
18+ init ( _gutterSize : string , tracker : TileCoordinator , cols : number , direction : string ) : void {
2019 this . _gutterSize = normalizeUnits ( _gutterSize ) ;
2120 this . _rows = tracker . rowCount ;
2221 this . _rowspan = tracker . rowspan ;
2322 this . _cols = cols ;
24- this . _dir = dir ;
23+ this . _direction = direction ;
2524 }
2625
2726 /**
@@ -93,7 +92,7 @@ export class TileStyler {
9392
9493 // The width and horizontal position of each tile is always calculated the same way, but the
9594 // 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' ;
9796 tile . setStyle ( side , this . getTilePosition ( baseTileWidth , colIndex ) ) ;
9897 tile . setStyle ( 'width' , calc ( this . getTileSize ( baseTileWidth , tile . colspan ) ) ) ;
9998 }
@@ -119,8 +118,8 @@ export class FixedTileStyler extends TileStyler {
119118 constructor ( public fixedRowHeight : string ) { super ( ) ; }
120119
121120 /** @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 ) ;
124123 this . fixedRowHeight = normalizeUnits ( this . fixedRowHeight ) ;
125124 }
126125
0 commit comments