From: Anton Khorev Date: Wed, 9 Apr 2025 15:36:23 +0000 (+0300) Subject: Replace deprecated hover listener by mouseenter/leave X-Git-Tag: live~61^2~1 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/b6bde64152ebce2d6c9eb7d538f04fc61616c2de?ds=sidebyside Replace deprecated hover listener by mouseenter/leave --- diff --git a/app/assets/javascripts/index/directions-route-output.js b/app/assets/javascripts/index/directions-route-output.js index 1f1ff4df6..800181034 100644 --- a/app/assets/javascripts/index/directions-route-output.js +++ b/app/assets/javascripts/index/directions-route-output.js @@ -95,13 +95,15 @@ OSM.DirectionsRouteOutput = function (map) { .openOn(map); }); - row.hover(function () { - highlight - .setLatLngs(lineseg) - .addTo(map); - }, function () { - map.removeLayer(highlight); - }); + row + .on("mouseenter", function () { + highlight + .setLatLngs(lineseg) + .addTo(map); + }) + .on("mouseleave", function () { + map.removeLayer(highlight); + }); } const blob = new Blob([JSON.stringify(polyline.toGeoJSON())], { type: "application/json" });