diff --git a/src/app/components/analysis-panel/analysis-panel.component.ts b/src/app/components/analysis-panel/analysis-panel.component.ts index 9363902466fbcb707c58bec7e17a309540e8f333..1387e48c3b32607a6d5079f4c1e066e0c3cd6f89 100644 --- a/src/app/components/analysis-panel/analysis-panel.component.ts +++ b/src/app/components/analysis-panel/analysis-panel.component.ts @@ -115,7 +115,7 @@ export class AnalysisPanelComponent implements OnInit, OnChanges { public tableProteinScoreTooltip = ''; public expressionMap: NodeAttributeMap; - public gradientMap: NodeAttributeMap; + public gradientMap: NodeAttributeMap = {}; constructor(private http: HttpClient, public analysis: AnalysisService, public netex: NetexControllerService) { } @@ -351,6 +351,12 @@ export class AnalysisPanelComponent implements OnInit, OnChanges { } close() { + this.gradientMap = {}; + this.expressionExpanded = false; + this.expressionMap = undefined; + this.seedMap = {}; + this.highlightSeeds = false; + this.showDrugs = false; this.analysis.switchSelection('main'); this.token = null; this.tokenChange.emit(this.token); @@ -539,6 +545,7 @@ export class AnalysisPanelComponent implements OnInit, OnChanges { node.x = pos[item.id].x; node.y = pos[item.id].y; const isSeed = this.highlightSeeds ? this.seedMap[node.id] : false; + const gradient = (this.gradientMap !== {}) && (this.gradientMap[item.id]) ? this.gradientMap[item.id] : 1.0; Object.assign( node, NetworkSettings.getNodeStyle( @@ -546,7 +553,7 @@ export class AnalysisPanelComponent implements OnInit, OnChanges { this.myConfig, isSeed, this.analysis.inSelection(getWrapperFromNode(item)), - 1.0 + gradient ) ) updatedNodes.push(node); diff --git a/src/app/services/analysis/analysis.service.ts b/src/app/services/analysis/analysis.service.ts index cc9738a8ab2d4313371811e19de7cf1144b4201d..97b4accc495912b24eb2b3087aaa1c0732afcffc 100644 --- a/src/app/services/analysis/analysis.service.ts +++ b/src/app/services/analysis/analysis.service.ts @@ -365,7 +365,7 @@ export class AnalysisService { clearInterval(this.intervalId); } // 5000 - this.intervalId = setInterval(watch, 5000000000000); + this.intervalId = setInterval(watch, 5000); }