Skip to content
Snippets Groups Projects
Commit 0c654e51 authored by Julian Matschinske's avatar Julian Matschinske
Browse files

Merge branch 'fix-details-view-for-drugs' into 'master'

Fix details view for drugs

See merge request covid-19/frontend!57
parents 46ded0c6 c990b8d5
No related branches found
No related tags found
No related merge requests found
......@@ -145,7 +145,7 @@ export class AnalysisWindowComponent implements OnInit, OnChanges {
}
}
} else if (selectedNodes[0].nodeType === 'drug') {
const drug: Drug = selectedNodes[0];
const drug: Drug = selectedNodes[0].details;
selectedId = drug.drugId;
selectedStatus = drug.status;
selectedName = drug.name;
......@@ -220,7 +220,6 @@ export class AnalysisWindowComponent implements OnInit, OnChanges {
const details = attributes.details || {};
for (const node of network.nodes) {
nodes.push(this.mapNode(node, nodeTypes[node] || this.inferNodeType(node), isSeed[node], scores[node], details[node]));
}
......@@ -298,6 +297,7 @@ export class AnalysisWindowComponent implements OnInit, OnChanges {
this.nodeData.nodes.add(this.drugNodes);
}
}
public screenshot() {
const elem = document.getElementById(this.indexscreenshot.toString());
html2canvas(elem).then((canvas) => {
......@@ -307,7 +307,7 @@ export class AnalysisWindowComponent implements OnInit, OnChanges {
a.download = `Resulting_Network.png`;
a.click();
});
}
});
}
}
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