Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

Commit a703fe5

Browse files
Scott HyndmanThomasBurleson
authored andcommitted
fix(gridList): Fixes "fit" mode
Closes #2012
1 parent bbbc475 commit a703fe5

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/components/gridList/grid-list.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -319,14 +319,12 @@ function GridListDirective($interpolate, $mdConstant, $mdGridLayout, $mdMedia) {
319319
}
320320

321321
function getGridStyle(colCount, rowCount, gutter, rowMode, rowHeight) {
322-
var style = {
323-
height: '',
324-
paddingBottom: ''
325-
};
322+
var style = {};
326323

327324
switch(rowMode) {
328325
case 'fixed':
329326
style.height = DIMENSION({ unit: rowHeight, span: rowCount, gutter: gutter });
327+
style.paddingBottom = '';
330328
break;
331329

332330
case 'ratio':
@@ -336,6 +334,7 @@ function GridListDirective($interpolate, $mdConstant, $mdGridLayout, $mdMedia) {
336334
vShare = hShare * (1 / rowHeight),
337335
vUnit = UNIT({ share: vShare, gutterShare: hGutterShare, gutter: gutter });
338336

337+
style.height = '';
339338
style.paddingBottom = DIMENSION({ unit: vUnit, span: rowCount, gutter: gutter});
340339
break;
341340

0 commit comments

Comments
 (0)