From 1e9603c7b1eed068d5c18d98d4505e1c6a764f81 Mon Sep 17 00:00:00 2001 From: Anton Khorev Date: Mon, 12 Aug 2024 07:29:27 +0300 Subject: [PATCH] Remove endpoint/input values on disable --- app/assets/javascripts/index/directions-endpoint.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/assets/javascripts/index/directions-endpoint.js b/app/assets/javascripts/index/directions-endpoint.js index 3ffb9b498..7fe4b4ea7 100644 --- a/app/assets/javascripts/index/directions-endpoint.js +++ b/app/assets/javascripts/index/directions-endpoint.js @@ -27,6 +27,9 @@ OSM.DirectionsEndpoint = function Endpoint(map, input, iconUrl, dragCallback, ch if (endpoint.geocodeRequest) endpoint.geocodeRequest.abort(); delete endpoint.geocodeRequest; + removeLatLng(); + delete endpoint.value; + input.val(""); map.removeLayer(endpoint.marker); }; -- 2.39.5