Skip to content

Commit

Permalink
Merge pull request #1597 from akvo/Dashboard-columns-not-flowing-full…
Browse files Browse the repository at this point in the history
…-width-on-some-(every-fourth)-pixel-width-#1593

Dashboard columns not flowing full width on some (every fourth) pixel…
  • Loading branch information
finnfiddle committed Aug 16, 2018
2 parents 220fcea + 651e39e commit 24bf80d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
"react-router-redux": "^4.0.8",
"react-scroll": "^1.7.10",
"react-select": "^1.0.0-rc.2",
"react-window-size": "^1.2.0",
"react-window-size": "^1.2.1",
"redux": "^3.6.0",
"redux-actions": "^1.1.0",
"redux-devtools": "^3.3.1",
Expand Down
12 changes: 10 additions & 2 deletions client/src/components/dashboard/DashboardViewerItem.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@ export default class DashboardViewerItem extends Component {
display: 'inline-block',
width: canvasWidth - (cMargin * 2),
minHeight: MIN_HEIGHT,
height: item.type === 'visualisation' && item.visualisation.visualisationType === 'map' ?
height: (
item.type === 'visualisation' &&
item.visualisation &&
item.visualisation.visualisationType === 'map'
) ?
MIN_HEIGHT :
null,
margin: cMargin,
Expand All @@ -41,7 +45,11 @@ export default class DashboardViewerItem extends Component {
display: 'inline-block',
width: (canvasWidth / 2) - (cMargin * 2),
minHeight: MIN_HEIGHT,
height: item.type === 'visualisation' && item.visualisation.visualisationType === 'map' ?
height: (
item.type === 'visualisation' &&
item.visualisation &&
item.visualisation.visualisationType === 'map'
) ?
MIN_HEIGHT :
null,
margin: cMargin,
Expand Down

0 comments on commit 24bf80d

Please sign in to comment.