@@ -18,7 +18,7 @@ export abstract class ResizeStrategy {
18
18
cssFriendlyColumnName : string ,
19
19
columnHeader : HTMLElement ,
20
20
sizeInPx : number ) : void ;
21
-
21
+
22
22
abstract applyMinColumnSize (
23
23
cssFriendlyColumnName : string ,
24
24
columnHeader : HTMLElement ,
@@ -39,15 +39,15 @@ export abstract class ResizeStrategy {
39
39
*/
40
40
@Injectable ( )
41
41
export class TableLayoutFixedResizeStrategy extends ResizeStrategy {
42
- applyColumnSize ( _ : string , columnHeader : HTMLElement , sizeInPx : number ) : void {
42
+ applyColumnSize ( _ : string , columnHeader : HTMLElement , sizeInPx : number ) : void {
43
43
columnHeader . style . width = coerceCssPixelValue ( sizeInPx ) ;
44
44
}
45
45
46
- applyMinColumnSize ( _ : string , columnHeader : HTMLElement , sizeInPx : number ) : void {
46
+ applyMinColumnSize ( _ : string , columnHeader : HTMLElement , sizeInPx : number ) : void {
47
47
columnHeader . style . minWidth = coerceCssPixelValue ( sizeInPx ) ;
48
48
}
49
49
50
- applyMaxColumnSize ( ) : void {
50
+ applyMaxColumnSize ( ) : void {
51
51
// Intentionally omitted as max-width causes strange rendering issues in Chrome.
52
52
// Max size will still apply when the user is resizing this column.
53
53
}
@@ -84,14 +84,14 @@ export class CdkFlexTableResizeStrategy extends ResizeStrategy implements OnDest
84
84
this . _applyProperty ( cssFriendlyColumnName , 'flex' , `0 0.01 ${ cssSize } ` ) ;
85
85
}
86
86
87
- applyMinColumnSize ( cssFriendlyColumnName : string , _ : HTMLElement , sizeInPx : number ) : void {
87
+ applyMinColumnSize ( cssFriendlyColumnName : string , _ : HTMLElement , sizeInPx : number ) : void {
88
88
const cssSize = coerceCssPixelValue ( sizeInPx ) ;
89
-
89
+
90
90
this . _applyProperty ( cssFriendlyColumnName , 'min-width' , cssSize ,
91
91
sizeInPx !== this . defaultMinSize ) ;
92
92
}
93
-
94
- applyMaxColumnSize ( cssFriendlyColumnName : string , _ : HTMLElement , sizeInPx : number ) : void {
93
+
94
+ applyMaxColumnSize ( cssFriendlyColumnName : string , _ : HTMLElement , sizeInPx : number ) : void {
95
95
const cssSize = coerceCssPixelValue ( sizeInPx ) ;
96
96
97
97
this . _applyProperty ( cssFriendlyColumnName , 'max-width' , cssSize ,
@@ -131,7 +131,7 @@ export class CdkFlexTableResizeStrategy extends ResizeStrategy implements OnDest
131
131
this . _styleElement . appendChild ( this . _document . createTextNode ( '' ) ) ;
132
132
this . _document . head . appendChild ( this . _styleElement ) ;
133
133
}
134
-
134
+
135
135
return this . _styleElement . sheet as CSSStyleSheet ;
136
136
}
137
137
@@ -147,14 +147,14 @@ export class CdkFlexTableResizeStrategy extends ResizeStrategy implements OnDest
147
147
private _applySizeCSS ( cssFriendlyColumnName : string ) {
148
148
const properties = this . _getColumnPropertiesMap ( cssFriendlyColumnName ) ;
149
149
const propertyKeys = Array . from ( properties . keys ( ) ) ;
150
-
150
+
151
151
let index = this . _columnIndexes . get ( cssFriendlyColumnName ) ;
152
152
if ( index === undefined ) {
153
153
if ( ! propertyKeys . length ) {
154
154
// Nothing to set or unset.
155
155
return ;
156
156
}
157
-
157
+
158
158
index = this . _indexSequence ++ ;
159
159
this . _columnIndexes . set ( cssFriendlyColumnName , index ) ;
160
160
} else {
0 commit comments