Place back removed map-button scroll code
authorLaury GvR <laury@gaslightmedia.com>
Wed, 22 Aug 2018 22:05:58 +0000 (18:05 -0400)
committerLaury GvR <laury@gaslightmedia.com>
Wed, 22 Aug 2018 22:05:58 +0000 (18:05 -0400)
glm-member-db/views/front/members/list.html

index db09089..58a1ee6 100644 (file)
                     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