Skip to content

Commit

Permalink
fixes heights in Column embed layout
Browse files Browse the repository at this point in the history
  • Loading branch information
davelandry committed Mar 12, 2019
1 parent 0abae92 commit c245ae9
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
7 changes: 7 additions & 0 deletions app/components/Viz/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class Viz extends Component {
}
vizProps.config = Object.assign(vizProps.config, configOverride);

// Custom configuration for comparison profiles
if (router.location.query.compare) {
let {groupBy} = vizProps.config;
if (!(groupBy instanceof Array)) groupBy = [groupBy];
Expand All @@ -37,6 +38,12 @@ class Viz extends Component {
}
}

// Custom configuration for embeds
const {sslug, tslug} = router.params;
if (sslug && tslug) {
if (vizProps.config.height) delete vizProps.config.height;
}

// strip out the "type" from config
const {type} = vizProps.config;
delete vizProps.config.type;
Expand Down
8 changes: 8 additions & 0 deletions app/profile/Embed.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,13 @@
& .d3plus {
min-height: auto;
}
&.Column {
& .topic-content {
flex: none;
}
& .topic-visualization {
flex: 1;
}
}
}
}

0 comments on commit c245ae9

Please sign in to comment.