Skip to content

Commit 3725859

Browse files
author
Aaron Caldwell
committed
Add circle drawing button
1 parent bee0fd5 commit 3725859

1 file changed

Lines changed: 17 additions & 1 deletion

File tree

  • x-pack/plugins/maps/public/connected_components/toolbar_overlay/feature_draw_controls/feature_draw_control

x-pack/plugins/maps/public/connected_components/toolbar_overlay/feature_draw_controls/feature_draw_control/feature_draw_control.tsx

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ export interface Props {
2121
export function FeatureDrawControl(props: Props) {
2222
const drawLineSelected = props.drawType === DRAW_TYPE.LINE;
2323
const drawPolygonSelected = props.drawType === DRAW_TYPE.POLYGON;
24+
const drawCircleSelected = props.drawType === DRAW_TYPE.DISTANCE;
2425
const drawBBoxSelected = props.drawType === DRAW_TYPE.BOUNDS;
2526
const drawPointSelected = props.drawType === DRAW_TYPE.POINT;
2627

@@ -46,7 +47,7 @@ export function FeatureDrawControl(props: Props) {
4647
<EuiButtonIcon
4748
className={`mapToolbarOverlay__button${drawPolygonSelected ? '__selected' : ''}`}
4849
onClick={() => props.initiateDraw(DRAW_TYPE.POLYGON)}
49-
iconType="home"
50+
iconType="node"
5051
aria-label={i18n.translate('xpack.maps.toolbarOverlay.featureDraw.drawPolygonLabel', {
5152
defaultMessage: 'Draw polygon',
5253
})}
@@ -57,6 +58,21 @@ export function FeatureDrawControl(props: Props) {
5758
isSelected={drawPolygonSelected}
5859
/>
5960
</EuiFlexItem>
61+
<EuiFlexItem key={'circle'} grow={false}>
62+
<EuiButtonIcon
63+
className={`mapToolbarOverlay__button${drawCircleSelected ? '__selected' : ''}`}
64+
onClick={() => props.initiateDraw(DRAW_TYPE.DISTANCE)}
65+
iconType="plusInCircle"
66+
aria-label={i18n.translate('xpack.maps.toolbarOverlay.featureDraw.drawCircleLabel', {
67+
defaultMessage: 'Draw circle',
68+
})}
69+
title={i18n.translate('xpack.maps.toolbarOverlay.featureDraw.drawCircleTitle', {
70+
defaultMessage: 'Draw circle',
71+
})}
72+
aria-pressed={drawCircleSelected}
73+
isSelected={drawCircleSelected}
74+
/>
75+
</EuiFlexItem>
6076
<EuiFlexItem key={'boundingBox'} grow={false}>
6177
<EuiButtonIcon
6278
className={`mapToolbarOverlay__button${drawBBoxSelected ? '__selected' : ''}`}

0 commit comments

Comments
 (0)