Skip to content

Commit

Permalink
fix: max with for ecogram and better label placement
Browse files Browse the repository at this point in the history
  • Loading branch information
friedjoff committed Apr 16, 2020
1 parent 0b30ae3 commit 55c8d51
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/Ecogram.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ function Ecogram({ data, selectForestType }) {
const { t } = useTranslation();

return (
<svg x="0px" y="0px" viewBox="0 0 1050 1050">
<svg x="0px" y="0px" viewBox="0 0 1050 1050" className={styles.svg}>
<EcogramPopup
forestTypes={popup.forestTypes}
onClose={() => setPopup({ forestTypes: [] })}
Expand Down Expand Up @@ -84,10 +84,10 @@ function Ecogram({ data, selectForestType }) {
>
{t('ecogram.wet')}
</text>
<text x="180" y="1040" className={styles.label}>
<text x="150" y="1040" className={styles.label}>
{t('ecogram.acid')}
</text>
<text x="1000" y="1040" className={styles.label}>
<text x="940" y="1040" className={styles.label}>
{t('ecogram.alkaline')}
</text>
</svg>
Expand Down
4 changes: 4 additions & 0 deletions src/components/Ecogram.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,7 @@
font-size: 2em;
text-anchor: middle;
}

.svg {
max-width: 525px;
}

0 comments on commit 55c8d51

Please sign in to comment.