From: Anton Khorev Date: Mon, 12 Aug 2024 04:29:27 +0000 (+0300) Subject: Remove endpoint/input values on disable X-Git-Tag: live~304^2 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/1e9603c7b1eed068d5c18d98d4505e1c6a764f81?hp=-c Remove endpoint/input values on disable --- 1e9603c7b1eed068d5c18d98d4505e1c6a764f81 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); };