[Maps] Only allow feature deletion when in delete-mode

This commit is contained in:
Aaron Caldwell 2021-06-29 04:43:58 -06:00 committed by GitHub
parent 6e308a2a1e
commit 436ddef784
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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