Skip to content
Snippets Groups Projects
Commit c2d83001 authored by Michael Hartung's avatar Michael Hartung
Browse files

keepin network overview updated

parent 88bd684a
Branches
No related tags found
No related merge requests found
......@@ -24,6 +24,7 @@ import {
Task,
Tissue,
Wrapper,
NodeInteraction,
} from '../../interfaces';
import domtoimage from 'dom-to-image';
import {toast} from 'bulma-toast';
......@@ -72,7 +73,7 @@ export class AnalysisPanelComponent implements OnInit, OnChanges {
}
@Output() tokenChange = new EventEmitter<string | null>();
@Output() showDetailsChange = new EventEmitter<Wrapper>();
@Output() visibleItems = new EventEmitter<[any[], [Node[], Tissue]]>();
@Output() visibleItems = new EventEmitter<[any[], [Node[], Tissue], NodeInteraction[]]>();
public task: Task | null = null;
public myConfig: IConfig = JSON.parse(JSON.stringify(defaultConfig));
......@@ -340,7 +341,7 @@ export class AnalysisPanelComponent implements OnInit, OnChanges {
public emitVisibleItems(on: boolean) {
if (on) {
this.visibleItems.emit([this.nodeData.nodes, [this.proteins, this.selectedTissue]]);
this.visibleItems.emit([this.nodeData.nodes, [this.proteins, this.selectedTissue], this.nodeData.edges]);
} else {
this.visibleItems.emit(null);
}
......@@ -585,6 +586,8 @@ export class AnalysisPanelComponent implements OnInit, OnChanges {
this.adjacentDrugEdgesList = [];
}
this.setLegendContext()
// emit data to update sidebar information
this.emitVisibleItems(true);
}
public updatePhysicsEnabled(bool: boolean) {
......
This diff is collapsed.
......@@ -12,6 +12,7 @@ import {
getDrugNodeId,
getWrapperFromNode,
legendContext,
NetworkEdge,
Node,
NodeAttributeMap,
NodeInteraction,
......@@ -163,6 +164,7 @@ export class ExplorerPageComponent implements OnInit, AfterViewInit {
public currentViewProteins: Node[];
public currentViewSelectedTissue: Tissue | null = null;
public currentViewNodes: Node[];
public currentViewEdges: NodeInteraction[];
public expressionExpanded = false;
public selectedTissue: Tissue | null = null;
......@@ -421,6 +423,7 @@ export class ExplorerPageComponent implements OnInit, AfterViewInit {
});
this.currentViewNodes = this.nodeData.nodes;
this.currentViewEdges = this.nodeData.edges;
this.currentViewProteins = this.proteins;
}
......@@ -572,13 +575,15 @@ export class ExplorerPageComponent implements OnInit, AfterViewInit {
});
}
analysisWindowChanged($event: [any[], [Node[], Tissue]]) {
analysisWindowChanged($event: [any[], [Node[], Tissue], NodeInteraction[]]) {
if ($event) {
this.currentViewNodes = $event[0];
this.currentViewEdges = $event[2];
this.currentViewProteins = $event[1][0];
this.currentViewSelectedTissue = $event[1][1];
} else {
this.currentViewNodes = this.nodeData.nodes;
this.currentViewEdges = this.nodeData.edges;
this.currentViewProteins = this.proteins;
this.currentViewSelectedTissue = this.selectedTissue;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment