From a703fe547528cc11b994fc5e054d1df82d2e76c2 Mon Sep 17 00:00:00 2001 From: Scott Hyndman Date: Wed, 23 Sep 2015 14:31:23 -0700 Subject: [PATCH] fix(gridList): Fixes "fit" mode Closes #2012 --- src/components/gridList/grid-list.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/components/gridList/grid-list.js b/src/components/gridList/grid-list.js index 7f4fe334113..5e701cd7f0a 100644 --- a/src/components/gridList/grid-list.js +++ b/src/components/gridList/grid-list.js @@ -319,14 +319,12 @@ function GridListDirective($interpolate, $mdConstant, $mdGridLayout, $mdMedia) { } function getGridStyle(colCount, rowCount, gutter, rowMode, rowHeight) { - var style = { - height: '', - paddingBottom: '' - }; + var style = {}; switch(rowMode) { case 'fixed': style.height = DIMENSION({ unit: rowHeight, span: rowCount, gutter: gutter }); + style.paddingBottom = ''; break; case 'ratio': @@ -336,6 +334,7 @@ function GridListDirective($interpolate, $mdConstant, $mdGridLayout, $mdMedia) { vShare = hShare * (1 / rowHeight), vUnit = UNIT({ share: vShare, gutterShare: hGutterShare, gutter: gutter }); + style.height = ''; style.paddingBottom = DIMENSION({ unit: vUnit, span: rowCount, gutter: gutter}); break;