[Maps] Only allow feature deletion when in delete-mode
This commit is contained in:
parent
6e308a2a1e
commit
436ddef784
|
@ -85,7 +85,8 @@ export class DrawFeatureControl extends Component<Props, {}> {
|
|||
|
||||
_onClick = async (event: MapMouseEvent, drawControl?: MapboxDraw) => {
|
||||
const mbLngLatPoint: MbPoint = event.point;
|
||||
if (!this.props.editLayer) {
|
||||
// Currently feature deletion is the only onClick handling
|
||||
if (!this.props.editLayer || this.props.drawShape !== DRAW_SHAPE.DELETE) {
|
||||
return;
|
||||
}
|
||||
const mbEditLayerIds = this.props.editLayer
|
||||
|
|
Loading…
Reference in a new issue