From 1f8ca269ca92d6caeec79fb6aa5d0d9260dc8cd2 Mon Sep 17 00:00:00 2001 From: Laury GvR Date: Wed, 22 Aug 2018 18:05:58 -0400 Subject: [PATCH] Place back removed map-button scroll code --- glm-member-db/views/front/members/list.html | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/glm-member-db/views/front/members/list.html b/glm-member-db/views/front/members/list.html index db09089..58a1ee6 100644 --- a/glm-member-db/views/front/members/list.html +++ b/glm-member-db/views/front/members/list.html @@ -746,6 +746,18 @@ initMap(); mapInitialized = true; } + var currentScroll = $(window).scrollTop(); // get current position + var mapTop = $("#glm-locationMap-container").offset().top-10; + {if $settings.list_show_search}fixmeTop = $('#glm-member-list-filters-button').offset().top;{/if} + if (currentScroll >= mapTop) { + $('body,html').animate({ + scrollTop: $("#glm-locationMap-container").offset().top-100 + }, 50); + } else { + $('body,html').animate({ + scrollTop: $("#glm-locationMap-container").offset().top-100 + }, 400); + } }); {if $settings.list_map_show_opened} // Start with map opened -- 2.17.1