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

deprecated onready parameter removed

parent 433bc44d
No related branches found
No related tags found
1 merge request!5Frontend refactor
......@@ -632,7 +632,7 @@ AbstractCustomMap.prototype._hideSelectedLayout = function(layoutId) {
* @param aliasId
* identifier of the alias
*/
AbstractCustomMap.prototype._openInfoWindowForAlias = function(aliasId, onready) {
AbstractCustomMap.prototype._openInfoWindowForAlias = function(aliasId) {
var self = this;
var infoWindow = this.getAliasInfoWindowById(aliasId);
......@@ -642,18 +642,11 @@ AbstractCustomMap.prototype._openInfoWindowForAlias = function(aliasId, onready)
} else {
logger.warn("Info window for alias: " + aliasId + " is already opened");
}
if (typeof onready === "function") {
onready();
}
return Promise.resolve();
} else {
return self.getModel().getAliasById(aliasId).then(function(alias) {
self._aliasInfoWindow[aliasId] = new AliasInfoWindow(alias, self);
return self._aliasInfoWindow[aliasId].init().then(function(){
if (typeof onready === "function") {
onready();
}
});
return self._aliasInfoWindow[aliasId].init();
});
}
};
......
......@@ -753,7 +753,7 @@ CustomMap.prototype.openInfoWindowForAlias = function(aliasId, modelId) {
logger.debug("Opening info window for alias: " + aliasId + ", model: " + modelId);
var model = this.getSubmodelById(modelId);
return model.getModel().getAliasById(aliasId, true).then(function() {
model._openInfoWindowForAlias(aliasId);
return model._openInfoWindowForAlias(aliasId);
});
};
......
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