Initialize only visible maps when page is loaded
Its known that initializing a map when it is inside a hidden element wont work when hidden element is shown, so its makes sense to avoid initialization of hidden maps. When a map lives within a hidden layer we need to initialize the map after the event of showing that hidden layer, in our case when admin settings tab is shown.
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
"use strict";
|
||||
App.Map = {
|
||||
initialize: function() {
|
||||
$("*[data-map]").each(function() {
|
||||
$("*[data-map]:visible").each(function() {
|
||||
App.Map.initializeMap(this);
|
||||
});
|
||||
$(".js-toggle-map").on({
|
||||
|
||||
Reference in New Issue
Block a user