Skip to content

Commit

Permalink
feat: ✨ Rendering radius prompt for circle (#1060)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tolfx committed Apr 27, 2022
1 parent 9875785 commit 09548e6
Showing 1 changed file with 23 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -209,10 +209,33 @@ export default function FeatureStyleSelector(props) {
}
};

const renderCircleRadiusSelector = () => {
return (
<Grid item xs={12} style={{ marginTop: 16 }}>
<Grid item xs={12} style={{ marginBottom: 4 }}>
<Typography align="center">Radius</Typography>
</Grid>
<Grid item xs={12}>
<TextField
variant="outlined"
type="number"
size="small"
fullWidth
value={props.model.getCircleRadius()}
onChange={(e) => {
props.model.setCircleRadius(e.target.value);
}}
></TextField>
</Grid>
</Grid>
);
};

return (
<Grid container>
{props.activeDrawType === "LineString" && renderStrokeTypeSelector()}
{props.activeDrawType === "Text" && renderTextSizeSelector()}
{props.activeDrawType === "Circle" && renderCircleRadiusSelector()}
<Grid item xs={12} style={{ marginTop: 16 }}>
<Grid item xs={12} style={{ marginBottom: 4 }}>
<Typography align="center">Utseende</Typography>
Expand Down

0 comments on commit 09548e6

Please sign in to comment.