From b6bde64152ebce2d6c9eb7d538f04fc61616c2de Mon Sep 17 00:00:00 2001 From: Anton Khorev Date: Wed, 9 Apr 2025 18:36:23 +0300 Subject: [PATCH] Replace deprecated hover listener by mouseenter/leave --- .../javascripts/index/directions-route-output.js | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) 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" }); -- 2.39.5