Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

Commit

Permalink
fix(gridList): Fixes "fit" mode
Browse files Browse the repository at this point in the history
Closes #2012
  • Loading branch information
Scott Hyndman authored and ThomasBurleson committed Oct 6, 2015
1 parent bbbc475 commit a703fe5
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/components/gridList/grid-list.js
Expand Up @@ -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':
Expand All @@ -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;

Expand Down

0 comments on commit a703fe5

Please sign in to comment.