diff --git a/frontend-js/src/main/js/map/window/AbstractInfoWindow.js b/frontend-js/src/main/js/map/window/AbstractInfoWindow.js index 6ef74549553c04f7184e0c75ff6ce68c29626c62..6545dbc42d4a72fc3f1e51292edc7cb400942859 100644 --- a/frontend-js/src/main/js/map/window/AbstractInfoWindow.js +++ b/frontend-js/src/main/js/map/window/AbstractInfoWindow.js @@ -34,7 +34,7 @@ function AbstractInfoWindow(abstractMarker, map) { var onOverlayFullViewChanged = function(e) { var self = e.object; // first change the content of the element - self.update().then(function(){ + self.update().then(function() { if (e.newVal) { var element = new IdentifiedElement({ objectId : self.getElementId(), @@ -353,12 +353,9 @@ AbstractInfoWindow.prototype._updateContent = function() { var contentDiv = null; var self = this; - return new Promise(function(resolve, reject) { - self.setContent(self.createWaitingContentDiv()); + self.setContent(self.createWaitingContentDiv()); - var x = self.createContentDiv(); - resolve(x); - }).then(function(content) { + return self.createContentDiv().then(function(content) { contentDiv = content; return self.createOverlaysDiv(); }).then(function(overlaysDiv) { diff --git a/frontend-js/src/main/js/map/window/PointInfoWindow.js b/frontend-js/src/main/js/map/window/PointInfoWindow.js index bc1edd44dc1d8eadf109b5435f3a96af27709f68..033c91d5539a93452f6b763063d39cdd5c257926 100644 --- a/frontend-js/src/main/js/map/window/PointInfoWindow.js +++ b/frontend-js/src/main/js/map/window/PointInfoWindow.js @@ -32,7 +32,7 @@ PointInfoWindow.prototype.createContentDiv = function() { title.innerHTML = "Point: " + this.pointData.getPoint(); result.appendChild(title); - return result; + return Promise.resolve(result); }; PointInfoWindow.prototype.getOverlaysData = function(general) { diff --git a/frontend-js/src/main/js/map/window/ReactionInfoWindow.js b/frontend-js/src/main/js/map/window/ReactionInfoWindow.js index d584384c106b0d13f4e485042dfeee883f8d8c43..13fb9e5e0ac678eae4b36d34ebf0339d6817f002 100644 --- a/frontend-js/src/main/js/map/window/ReactionInfoWindow.js +++ b/frontend-js/src/main/js/map/window/ReactionInfoWindow.js @@ -41,16 +41,7 @@ ReactionInfoWindow.prototype.constructor = ReactionInfoWindow; * @returns {String} representing html code for content of the info window */ ReactionInfoWindow.prototype.createContentDiv = function() { - if (this._reactionData !== undefined) { - var content = document.createElement("div"); - /* - * var title = document.createElement("h3"); title.innerHTML = - * "ReactionInfoWindow is not yet implemented."; content.appendChild(title) - */ - return content; - } else { - return null; - } + return Promise.resolve(document.createElement("div")); }; /**