diff --git a/src/app/components/analysis-window/analysis-window.component.ts b/src/app/components/analysis-window/analysis-window.component.ts index 3370e8e5f417684a28ed005a4ebc202c0399c5c1..972154ba3b40601adc1572220f742c668b7a529c 100644 --- a/src/app/components/analysis-window/analysis-window.component.ts +++ b/src/app/components/analysis-window/analysis-window.component.ts @@ -105,7 +105,9 @@ export class AnalysisWindowComponent implements OnInit, OnChanges { this.nodeData.edges = new vis.DataSet(edges); 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); diff --git a/src/app/components/launch-analysis/launch-analysis.component.html b/src/app/components/launch-analysis/launch-analysis.component.html index 77ab252a1bd7e1e94e87609b729fe8a7595795be..e9a0ed4f002fb4102648d94d3deb78bd15adc5b7 100644 --- a/src/app/components/launch-analysis/launch-analysis.component.html +++ b/src/app/components/launch-analysis/launch-analysis.component.html @@ -387,7 +387,6 @@ 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 of minimum size connecting a given set of seed nodes. - This implementation behaves non-deterministically, so results can differ between multiple runs. </p> </div> </div> diff --git a/src/app/network-settings.ts b/src/app/network-settings.ts index 30476257b3f8784e0eda65b5831008ea5dff3c96..62ef5350de98d36383fcd2d7485ae4702f5985b7 100644 --- a/src/app/network-settings.ts +++ b/src/app/network-settings.ts @@ -49,6 +49,9 @@ export class NetworkSettings { enabled: true, }, }; + private static analysisBigPhysics = { + enabled: false, + }; private static mainLayout = { improvedLayout: false, @@ -96,7 +99,7 @@ export class NetworkSettings { } } - static getOptions(network: 'main' | 'analysis') { + static getOptions(network: 'main' | 'analysis' | 'analysis-big') { if (network === 'main') { return { layout: this.mainLayout, @@ -109,6 +112,12 @@ export class NetworkSettings { edges: this.analysisEdges, physics: this.analysisPhysics, }; + } else if (network === 'analysis-big') { + return { + layout: this.analysisLayout, + edges: this.analysisEdges, + physics: this.analysisBigPhysics, + }; } } diff --git a/src/app/pages/explorer-page/explorer-page.component.scss b/src/app/pages/explorer-page/explorer-page.component.scss index 5d4f9d9e6b57f2fc27268e0dc7a82872041f4f76..a8f8f2de3ac303f45a5ac76c591a4699ee5b0711 100644 --- a/src/app/pages/explorer-page/explorer-page.component.scss +++ b/src/app/pages/explorer-page/explorer-page.component.scss @@ -42,11 +42,9 @@ font-weight: bold; } -.seed-selection { - .card-footer { - font-size: 12px; - a { - padding: 3px; - } +.card-footer { + font-size: 12px; + a { + padding: 3px; } }