Skip to content
Snippets Groups Projects
Commit 1ba846ed authored by Piotr Gawron's avatar Piotr Gawron
Browse files

Merge branch '86-searching-for-elements-in-submap' into 'master'

Resolve "searching for elements in submap"

Closes #86

See merge request piotr.gawron/minerva!225
parents 6ec9d597 155317d0
No related branches found
No related tags found
1 merge request!225Resolve "searching for elements in submap"
Pipeline #
......@@ -918,8 +918,7 @@ AbstractCustomMap.prototype.addCenterButton = function () {
bounds.extend(self.getTopLeftLatLng());
bounds.extend(self.getBottomRightLatLng());
self.getGoogleMap().fitBounds(bounds);
return false;
return self.getGoogleMap().fitBounds(bounds);
},
xss: false
});
......@@ -1131,7 +1130,7 @@ AbstractCustomMap.prototype.fitBounds = function (markers) {
}
}
if (!bounds.isEmpty()) {
map.fitBounds(bounds);
return map.fitBounds(bounds);
}
}
};
......
......@@ -467,7 +467,7 @@ CustomMap.prototype.customizeGoogleMapView = function (div) {
bounds.extend(self.getTopLeftLatLng());
bounds.extend(self.getBottomRightLatLng());
self.getGoogleMap().fitBounds(bounds);
return self.getGoogleMap().fitBounds(bounds);
}
};
......@@ -731,11 +731,13 @@ CustomMap.prototype.renderOverlayCollection = function (params) {
}
});
}).then(function () {
var promises = [];
if (elements.length > 0 && fitBounds) {
for (var j = 0; j < submaps.length; j++) {
submaps[j].fitBounds(markers);
promises.push(submaps[j].fitBounds(markers));
}
}
return Promise.all(promises);
});
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment