From 1da3c151f9c16a70b5b7189c5d3a83d860a5f187 Mon Sep 17 00:00:00 2001 From: giuseppe straziota <31009188+giuseppe-straziota@users.noreply.github.com> Date: Tue, 6 Dec 2022 20:59:45 +0100 Subject: [PATCH] fix: Fix to fire the finishMovePosition state at the end of a feature editing (#828) --- modules/react-map-gl-draw/src/edit-modes/editing-mode.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/react-map-gl-draw/src/edit-modes/editing-mode.ts b/modules/react-map-gl-draw/src/edit-modes/editing-mode.ts index 7f39d2d33..cf68935ca 100644 --- a/modules/react-map-gl-draw/src/edit-modes/editing-mode.ts +++ b/modules/react-map-gl-draw/src/edit-modes/editing-mode.ts @@ -73,12 +73,12 @@ export default class EditingMode extends BaseMode { const picked = event.picks && event.picks[0]; // @ts-ignore - if (!picked || !picked.Object || !isNumeric(picked.featureIndex)) { + if (!picked || !picked.object || !isNumeric(picked.featureIndex)) { return; } const pickedObject = picked.object; - switch (pickedObject.type) { + switch (pickedObject.type.toLowerCase()) { case ELEMENT_TYPE.FEATURE: case ELEMENT_TYPE.FILL: case ELEMENT_TYPE.EDIT_HANDLE: