]> git.openstreetmap.org Git - rails.git/commitdiff
Remove endpoint/input values on disable
authorAnton Khorev <tony29@yandex.ru>
Mon, 12 Aug 2024 04:29:27 +0000 (07:29 +0300)
committerAnton Khorev <tony29@yandex.ru>
Wed, 21 Aug 2024 08:43:26 +0000 (11:43 +0300)
app/assets/javascripts/index/directions-endpoint.js

index 3ffb9b498723f06363cfe1f94c246e39ec864ca9..7fe4b4ea7f4803053f816d2f9d7986817e798aab 100644 (file)
@@ -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);
   };