Skip to content
This repository has been archived by the owner on Jul 22, 2020. It is now read-only.

Commit

Permalink
fix: map marker scaling
Browse files Browse the repository at this point in the history
  • Loading branch information
manuel-calavera committed Oct 9, 2019
1 parent c5ab79e commit 6ce18dc
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/v2/components/ValidatorsMap/Marker.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import useStyles from './styles';

const Marker = ({scale, marker}: {scale: number, marker: any}) => {
const classes = useStyles();
const size = scale < 4 ? 10 * scale : 40;
const transformScale = scale < 4 ? scale / 4 : 1;
return (
<MapTooltip
classes={{tooltip: classes.tooltip}}
Expand All @@ -18,10 +18,13 @@ const Marker = ({scale, marker}: {scale: number, marker: any}) => {
</>
)}
>
<div className={classes.marker}>
<div
className={classes.marker}
style={{transform: `scale(${transformScale})`}}
>
<Avatar
width={size}
height={size}
width={40}
height={40}
avatarUrl={marker.avatarUrl}
name={marker.name}
pubkey={marker.pubkey}
Expand Down

0 comments on commit 6ce18dc

Please sign in to comment.