From 7848643990f11e079b73310936fc1d2a85cffe83 Mon Sep 17 00:00:00 2001 From: Anton Khorev Date: Wed, 9 Aug 2023 20:46:52 +0300 Subject: [PATCH] Add show home location button listener --- app/assets/javascripts/user.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/assets/javascripts/user.js b/app/assets/javascripts/user.js index 197433a13..88999f45a 100644 --- a/app/assets/javascripts/user.js +++ b/app/assets/javascripts/user.js @@ -64,6 +64,13 @@ $(document).ready(function () { }); $("#home_lat, #home_lon").on("input", respondToHomeUpdate); + + $("#home_show").click(function () { + var lat = $("#home_lat").val(), + lon = $("#home_lon").val(); + + map.panTo([lat, lon]); + }); } else { $("[data-user]").each(function () { var user = $(this).data("user"); -- 2.39.5