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

Merge branch 'small-fixes' into 'master'

Small fixes

See merge request covid-19/frontend!127
parents 9185c0e7 3e429b15
No related branches found
No related tags found
No related merge requests found
...@@ -105,7 +105,9 @@ export class AnalysisPanelComponent implements OnInit, OnChanges { ...@@ -105,7 +105,9 @@ export class AnalysisPanelComponent implements OnInit, OnChanges {
this.nodeData.edges = new vis.DataSet(edges); this.nodeData.edges = new vis.DataSet(edges);
const container = this.networkEl.nativeElement; const container = this.networkEl.nativeElement;
const options = NetworkSettings.getOptions('analysis'); const isBig = nodes.length > 100 || edges.length > 100;
const options = NetworkSettings.getOptions(isBig ? 'analysis-big' : 'analysis');
this.physicsEnabled = !isBig;
this.network = new vis.Network(container, this.nodeData, options); this.network = new vis.Network(container, this.nodeData, options);
......
...@@ -387,7 +387,6 @@ ...@@ -387,7 +387,6 @@
The <a href="https://en.wikipedia.org/wiki/Steiner_tree_problem">Steiner tree</a> The <a href="https://en.wikipedia.org/wiki/Steiner_tree_problem">Steiner tree</a>
problem is a classical combinatorial optimization problem. It asks to find a sub-graph problem is a classical combinatorial optimization problem. It asks to find a sub-graph
of minimum size connecting a given set of seed nodes. of minimum size connecting a given set of seed nodes.
This implementation behaves non-deterministically, so results can differ between multiple runs.
</p> </p>
</div> </div>
</div> </div>
......
...@@ -49,6 +49,9 @@ export class NetworkSettings { ...@@ -49,6 +49,9 @@ export class NetworkSettings {
enabled: true, enabled: true,
}, },
}; };
private static analysisBigPhysics = {
enabled: false,
};
private static mainLayout = { private static mainLayout = {
improvedLayout: false, improvedLayout: false,
...@@ -96,7 +99,7 @@ export class NetworkSettings { ...@@ -96,7 +99,7 @@ export class NetworkSettings {
} }
} }
static getOptions(network: 'main' | 'analysis') { static getOptions(network: 'main' | 'analysis' | 'analysis-big') {
if (network === 'main') { if (network === 'main') {
return { return {
layout: this.mainLayout, layout: this.mainLayout,
...@@ -109,6 +112,12 @@ export class NetworkSettings { ...@@ -109,6 +112,12 @@ export class NetworkSettings {
edges: this.analysisEdges, edges: this.analysisEdges,
physics: this.analysisPhysics, physics: this.analysisPhysics,
}; };
} else if (network === 'analysis-big') {
return {
layout: this.analysisLayout,
edges: this.analysisEdges,
physics: this.analysisBigPhysics,
};
} }
} }
......
...@@ -42,11 +42,9 @@ ...@@ -42,11 +42,9 @@
font-weight: bold; font-weight: bold;
} }
.seed-selection { .card-footer {
.card-footer { font-size: 12px;
font-size: 12px; a {
a { padding: 3px;
padding: 3px;
}
} }
} }
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