Skip to content
Snippets Groups Projects
Commit 0be60f28 authored by AndiMajore's avatar AndiMajore
Browse files

Merge branch 'master' of gitlab.lrz.de:netex/frontend

parents c3ca27cf ffaa7083
No related branches found
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));
......@@ -299,12 +300,12 @@ export class AnalysisPanelComponent implements OnInit, OnChanges {
// else: selected is null
const updatedNodes = [];
this.nodeData.nodes.forEach((node) => {
let drugType;
let drugInTrial;
if (node.wrapper.data.netexId && node.wrapper.data.netexId.startswith('d')) {
drugType = node.wrapper.data.status;
drugInTrial = node.wrapper.data.inTrial;
}
// let drugType;
// let drugInTrial;
// if (node.netexId && node.netexId.startsWith('d')) {
// drugType = node.status;
// drugInTrial = node.inTrial;
// }
const isSeed = this.highlightSeeds ? this.seedMap[node.id] : false;
const gradient = (this.gradientMap !== {}) && (this.gradientMap[node.id]) ? this.gradientMap[node.id] : 1.0;
const nodeStyled = NetworkSettings.getNodeStyle(
......@@ -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.
Finish editing this message first!
Please register or to comment