diff --git a/frontend-js/src/main/js/map/CustomMap.js b/frontend-js/src/main/js/map/CustomMap.js index 2e410265b84814dbc86e0aaee3453d799560d205..7c43df5c05788bbf188fbfdd4927961d4be3d11b 100644 --- a/frontend-js/src/main/js/map/CustomMap.js +++ b/frontend-js/src/main/js/map/CustomMap.js @@ -700,80 +700,6 @@ CustomMap.prototype.showSelectedLayout = function(layoutId, index, length) { return Promise.all(promises); }; -/** - * Adds information about reactions visible in the specific layout. - * - * @param layoutId - * identifier of the layout - * - * @param jsonAliases - * list of reactions in json format - * - */ -CustomMap.prototype.addReactionsForLayout = function(layoutId, jsonReactions) { - logger.debug("Adding reactions for layout: " + layoutId); - var reactions = JSON.parse(jsonReactions); - for (var i = 0; i < reactions.length; i++) { - var reaction = reactions[i]; - var model = this.getSubmodelById(reaction.modelId); - if (model !== undefined) { - model.getModel().addReactionForLayout(layoutId, reaction); - } else { - logger.warn("Unknown model: " + reaction.modelId); - } - } - this.retrieveMissingReactions(); -}; - -/** - * Adds information about reactions. - * - * @param jsonAliases - * list of reactions in json format - * - */ -CustomMap.prototype.addReactions = function(jsonReactions) { - var reactions = JSON.parse(jsonReactions); - for (var i = 0; i < reactions.length; i++) { - var reaction = reactions[i]; - var model = this.getSubmodelById(reaction.modelId); - if (model !== undefined) { - model.addReaction(reaction); - } else { - logger.warn("Unknown model: " + reaction.modelId); - } - } - this.callListeners("onAddReactions"); -}; - -/** - * This function will ask server for reactions that should be visualized but the - * data is still missing on the client side. - */ -CustomMap.prototype.retrieveMissingReactions = function() { - var ids = []; - var missing = this.getModel().getMissingReactionIds(); - for (var k = 0; k < missing.length; k++) { - ids.push([ this.getId(), missing[k] ]); - } - for (var i = 0; i < this.submaps.length; i++) { - missing = this.submaps[i].getModel().getMissingReactionIds(); - for (var j = 0; j < missing.length; j++) { - ids.push([ this.submaps[i].getId(), missing[j] ]); - } - } - if (ids.length > 0) { - // load data from server about missing reactions - ServerConnector.retreiveLightReactions(ids); - } - if (!ServerConnector.isWaitingForData()) { - // if we already have everything then just refresh data to be visualized - this.refreshSelectedLayouts(); - // and close "loading" dialog (if opened) - GuiConnector.closeLoadingDialog(); - } -}; - /** * This method checks if the layout contains any overlays (like AliasOverlay or * ReactionOverlay) that is currently visible on the map. @@ -1168,14 +1094,6 @@ CustomMap.prototype.getReferenceGenome = function(type, version) { } }; -CustomMap.prototype.updateReferenceGenome = function(type, version, jsonObj) { - if (this._referenceGenome[type] === undefined) { - this._referenceGenome[type] = []; - } - this._referenceGenome[type][version] = new ReferenceGenome(jsonObj); - this.refreshInfoWindows(); -}; - CustomMap.prototype.getTopMap = function() { return this; };