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