From 48521289455848279e355ee7dba28085382ce99e Mon Sep 17 00:00:00 2001
From: Xiao Gui <xgui3783@gmail.com>
Date: Mon, 7 Jan 2019 16:39:34 +0100
Subject: [PATCH] chore: cleaning up

---
 .../atlasViewer.constantService.service.ts      |  7 +++++--
 src/services/stateStore.service.ts              |  4 ++++
 src/ui/banner/banner.component.ts               | 17 ++++++++---------
 3 files changed, 17 insertions(+), 11 deletions(-)

diff --git a/src/atlasViewer/atlasViewer.constantService.service.ts b/src/atlasViewer/atlasViewer.constantService.service.ts
index 976719e71..b792ebb48 100644
--- a/src/atlasViewer/atlasViewer.constantService.service.ts
+++ b/src/atlasViewer/atlasViewer.constantService.service.ts
@@ -16,7 +16,7 @@ export class AtlasViewerConstantsServices{
   public ngLandmarkLayerName = 'spatial landmark layer'
   public ngUserLandmarkLayerName = 'user landmark layer'
 
-  public citationToastDuration = 7000
+  public citationToastDuration = 7e3
 
   /**
    * optimized for nehubaConfig.layout.useNehubaPerspective.fixedZoomPerspectiveSlices
@@ -26,7 +26,10 @@ export class AtlasViewerConstantsServices{
    */
   public nehubaLandmarkConstant = 1e-8
 
-  private TIMEOUT = 4000
+  /**
+   * Timeout can be longer, since configs are lazy loaded.
+   */
+  private TIMEOUT = 16000
 
   /**
    * raceFetch 
diff --git a/src/services/stateStore.service.ts b/src/services/stateStore.service.ts
index 7ea4f7250..52e4df7e6 100644
--- a/src/services/stateStore.service.ts
+++ b/src/services/stateStore.service.ts
@@ -121,6 +121,10 @@ export interface NgViewerAction extends Action{
   forceShowSegment : boolean
 }
 
+
+/**
+ * TODO unused function, remove
+ */
 const mapLayer = (existingLayer:NgLayerInterface, incomingLayer:NgLayerInterface):NgLayerInterface => {
   return incomingLayer.mixability === 'base'
     ? existingLayer
diff --git a/src/ui/banner/banner.component.ts b/src/ui/banner/banner.component.ts
index 950bd7a38..29088073b 100644
--- a/src/ui/banner/banner.component.ts
+++ b/src/ui/banner/banner.component.ts
@@ -31,7 +31,7 @@ export class AtlasBanner implements OnDestroy, OnInit {
   public selectedTemplate: any
   public selectedParcellation: any
   public selectedRegions: any[] = []
-  private navigation: { position: [number, number, number] } = { position: [0, 0, 0] }
+  // private navigation: { position: [number, number, number] } = { position: [0, 0, 0] }
 
   private subscriptions: Subscription[] = []
 
@@ -118,13 +118,13 @@ export class AtlasBanner implements OnDestroy, OnInit {
       ).subscribe(arr => arr.length > 1 ? this.doubleClick(arr[0]) : this.singleClick(arr[0]))
     )
 
-    this.subscriptions.push(
-      this.store.pipe(
-        select('viewerState'),
-        safeFilter('navigation'),
-        map(obj => obj.navigation)
-      ).subscribe((navigation: any) => this.navigation = navigation)
-    )
+    // this.subscriptions.push(
+    //   this.store.pipe(
+    //     select('viewerState'),
+    //     safeFilter('navigation'),
+    //     map(obj => obj.navigation)
+    //   ).subscribe((navigation: any) => this.navigation = navigation)
+    // )
   }
 
   ngOnDestroy() {
@@ -293,4 +293,3 @@ export class AtlasBanner implements OnDestroy, OnInit {
     return this.constantService.mobile
   }
 }
-
-- 
GitLab