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

promise chain fixed

parent 7d231581
No related branches found
No related tags found
1 merge request!5Frontend refactor
......@@ -857,15 +857,15 @@ CustomMap.prototype.renderOverlayCollection = function(overlayCollection, fitBou
}
});
}).then(function() {
for (var i = 0; i < elements.length; i++) {
var element = elements[i];
return Promise.each(elements, function(element) {
var infoWindow = self.getInfoWindowForIdentifiedElement(element);
if (infoWindow !== null && infoWindow !== undefined) {
self.retrieveOverlayDetailDataForElement(element, infoWindow.getOverlayFullViewArray());
self.updateInfoWindowForIdentifiedElement(element);
return self.retrieveOverlayDetailDataForElement(element, infoWindow.getOverlayFullViewArray()).then(function() {
self.updateInfoWindowForIdentifiedElement(element);
});
}
}
});
}).then(function() {
if (elements.length > 0 && fitBounds) {
for ( var mapId in boundsArray) {
......
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