From 944f2e02e0178fc663f20f700837d9b674e5d3b4 Mon Sep 17 00:00:00 2001
From: AndiMajore <andi.majore@googlemail.com>
Date: Thu, 16 Sep 2021 16:59:10 +0200
Subject: [PATCH] potential fix for shared service issue

---
 package-lock.json                                   |  2 +-
 .../pages/explorer-page/explorer-page.component.ts  | 13 +++----------
 src/app/services/analysis/analysis.service.ts       |  2 +-
 3 files changed, 5 insertions(+), 12 deletions(-)

diff --git a/package-lock.json b/package-lock.json
index d6109a90..17d601db 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,6 +1,6 @@
 {
   "name": "netex",
-  "version": "0.8.3",
+  "version": "0.8.9-rc1",
   "lockfileVersion": 1,
   "requires": true,
   "dependencies": {
diff --git a/src/app/pages/explorer-page/explorer-page.component.ts b/src/app/pages/explorer-page/explorer-page.component.ts
index 8d8b9f04..3c32bde6 100644
--- a/src/app/pages/explorer-page/explorer-page.component.ts
+++ b/src/app/pages/explorer-page/explorer-page.component.ts
@@ -196,15 +196,8 @@ export class ExplorerPageComponent implements OnInit, AfterViewInit {
     public analysis: AnalysisService,
     public netex: NetexControllerService) {
     this.showDetails = false;
-
     this.analysis.subscribeList(async (items, selected) => {
-      // while (this.networkEl == null) {
-      //   await setTimeout(() => {
-      //   }, 200);
-      // }
-      // if (this.networkEl.nativeElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.id !== this.id)
-      //   return;
-      // console.log("subcribe event on " + this.id)
+
       // return if analysis panel is open or no nodes are loaded
       if (this.selectedAnalysisToken || !this.nodeData.nodes) {
         return;
@@ -398,7 +391,7 @@ export class ExplorerPageComponent implements OnInit, AfterViewInit {
     // }
     // if (this.networkEl.nativeElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.id !== this.id)
     //   return;
-    console.log("network "+this.id+" is set up!")
+    console.log("network " + this.id + " is set up!")
     this.analysis.resetSelection();
     this.selectedWrapper = null;
     // getNetwork synchronizes the input network with the database
@@ -427,7 +420,7 @@ export class ExplorerPageComponent implements OnInit, AfterViewInit {
     this.networkInternal = new vis.Network(container, this.nodeData, options);
 
     this.networkInternal.on('doubleClick', (properties) => {
-      console.log("selected on node in "+this.id)
+      console.log("selected on node in " + this.id)
       const nodeIds: Array<string> = properties.nodes;
       if (nodeIds != null && nodeIds.length > 0) {
         const nodeId = nodeIds[0];
diff --git a/src/app/services/analysis/analysis.service.ts b/src/app/services/analysis/analysis.service.ts
index 7df44389..05835f1b 100644
--- a/src/app/services/analysis/analysis.service.ts
+++ b/src/app/services/analysis/analysis.service.ts
@@ -44,7 +44,7 @@ export const MULTISTEINER: Algorithm = {slug: 'multisteiner', name: algorithmNam
 export const MAX_TASKS = 3;
 
 @Injectable({
-  providedIn: 'root'
+  providedIn: 'any'
 })
 export class AnalysisService {
 
-- 
GitLab