Skip to content

Commit

Permalink
Merge pull request #209 from bcgsc/release/v6.10.2
Browse files Browse the repository at this point in the history
Release/v6.10.2
  • Loading branch information
kttkjl committed Apr 27, 2022
2 parents 8e4ed08 + 89dd0fb commit 5afdd36
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 8 deletions.
17 changes: 13 additions & 4 deletions app/components/Image/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ const Image = ({
format,
key,
} = {} as ImageType,
height = undefined,
width = undefined,
height: heightProp = undefined,
width: widthProp = undefined,
showTitle = false,
showCaption = false,
isZoomable = true,
Expand All @@ -39,6 +39,15 @@ const Image = ({
}
}, [isZoomable]);

let height = heightProp;
let width = widthProp;
if (heightProp && Number.isInteger(heightProp)) {
height = `${heightProp}px`;
}
if (widthProp && Number.isInteger(widthProp)) {
width = `${widthProp}px`;
}

if (data) {
return (
<>
Expand All @@ -58,8 +67,8 @@ const Image = ({
src={`data:image/${format};base64,${data}`}
alt={title}
key={key}
height={Number.isInteger(height) ? `${height}px` : height}
width={Number.isInteger(width) ? `${height}px` : width}
height={height}
width={width}
style={imgStyle}
/>
</Button>
Expand Down
1 change: 1 addition & 0 deletions app/components/PrintTable/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
&__row {
font-size: 10pt;
border-bottom: 1px solid $palette__text--hint;
page-break-inside: avoid;

& td {
padding: 10px 4px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ const EXPRESSION_KEYS = [
{ key: 'expression.spearman.gtex', title: 'GTEX' },
];

const DEFAULT_IMG_WIDTH = 800;

type ExpressionCorrelationProps = WithLoadingInjectedProps;

const ExpressionCorrelation = ({
Expand Down Expand Up @@ -89,6 +91,7 @@ const ExpressionCorrelation = ({
<PlotByKey
accessor={group.key}
plots={plots}
width={DEFAULT_IMG_WIDTH}
/>
</div>
))}
Expand Down Expand Up @@ -118,8 +121,7 @@ const ExpressionCorrelation = ({
<div className="expression-correlation__expression-charts">
{sampleExpressionCharts(plots.find((plot) => plot.key === 'expression.chart')
? LEGACY_EXPRESSION_KEYS
: EXPRESSION_KEYS)
}
: EXPRESSION_KEYS)}
</div>
</div>
{/* This section should only appear if there's data */}
Expand All @@ -134,6 +136,7 @@ const ExpressionCorrelation = ({
<PlotByKey
plots={plots}
accessor="scpPlot"
width={DEFAULT_IMG_WIDTH}
/>
</div>
</div>
Expand All @@ -154,6 +157,7 @@ const ExpressionCorrelation = ({
image={plot}
showTitle
showCaption
width={DEFAULT_IMG_WIDTH}
/>
))}
</div>
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": true,
"name": "ipr-client",
"version": "6.10.1",
"version": "6.10.2",
"keywords": [],
"license": "GPL-3.0",
"sideEffects": false,
Expand Down

0 comments on commit 5afdd36

Please sign in to comment.