From eab544e6754e19b037fef3059df3b95cc56549c5 Mon Sep 17 00:00:00 2001
From: Xiao Gui <xgui3783@gmail.com>
Date: Mon, 5 Jul 2021 11:55:29 +0200
Subject: [PATCH] chore: remove unneeded import chore: prettify freesurfer
 selector

---
 src/main.module.ts                            |  2 +-
 src/util/pureConstant.service.ts              | 54 +++++++++----------
 .../threeSurferGlue/threeSurfer.template.html | 23 +++-----
 3 files changed, 35 insertions(+), 44 deletions(-)

diff --git a/src/main.module.ts b/src/main.module.ts
index 9d0a65770..6830ec521 100644
--- a/src/main.module.ts
+++ b/src/main.module.ts
@@ -32,7 +32,7 @@ import { DockedContainerDirective } from "./util/directives/dockedContainer.dire
 import { FloatingContainerDirective } from "./util/directives/floatingContainer.directive";
 import { FloatingMouseContextualContainerDirective } from "./util/directives/floatingMouseContextualContainer.directive";
 import { NewViewerDisctinctViewToLayer } from "./util/pipes/newViewerDistinctViewToLayer.pipe";
-import { ClickInterceptor, CLICK_INTERCEPTOR_INJECTOR, CONTEXT_MENU_ITEM_INJECTOR, PureContantService, UtilModule } from "src/util";
+import { ClickInterceptor, CLICK_INTERCEPTOR_INJECTOR, PureContantService, UtilModule } from "src/util";
 import { SpotLightModule } from 'src/spotlight/spot-light.module'
 import { TryMeComponent } from "./ui/tryme/tryme.component";
 import { UiStateUseEffect } from "src/services/state/uiState.store";
diff --git a/src/util/pureConstant.service.ts b/src/util/pureConstant.service.ts
index f948ad7d5..5150c368a 100644
--- a/src/util/pureConstant.service.ts
+++ b/src/util/pureConstant.service.ts
@@ -504,37 +504,37 @@ Raise/track issues at github repo: <a target = "_blank" href = "${this.repoUrl}"
                   /**
                    * concating all available gii maps
                    */
-                  const allFreesurferLabels = foundP.volumeSrc[tmpl.id][hemisphereKey].filter(v => v.volume_type === 'threesurfer/gii-label')
-                  for (const lbl of allFreesurferLabels) {
-                    const modeToConcat = {
-                      mesh: surface.url,
-                      hemisphere: surface.hemisphere,
-                      colormap: lbl.url
-                    }
-
-                    const key = `${surface.mode} - ${lbl.name}`
-                    if (!modObj[key]) {
-                      modObj[key] = []
-                    }
-                    modObj[key].push(modeToConcat)
-                  }
+                  // const allFreesurferLabels = foundP.volumeSrc[tmpl.id][hemisphereKey].filter(v => v.volume_type === 'threesurfer/gii-label')
+                  // for (const lbl of allFreesurferLabels) {
+                  //   const modeToConcat = {
+                  //     mesh: surface.url,
+                  //     hemisphere: surface.hemisphere,
+                  //     colormap: lbl.url
+                  //   }
+
+                  //   const key = `${surface.mode} - ${lbl.name}`
+                  //   if (!modObj[key]) {
+                  //     modObj[key] = []
+                  //   }
+                  //   modObj[key].push(modeToConcat)
+                  // }
 
                   /**
                    * only concat first matching gii map
                    */
-                  // const key = surface.mode
-                  // const modeToConcat = {
-                  //   mesh: surface.url,
-                  //   hemisphere: surface.hemisphere,
-                  //   colormap: (() => {
-                  //     const lbl = foundP.volumeSrc[tmpl.id][hemisphereKey].find(v => v.volume_type === 'threesurfer/gii-label')
-                  //     return lbl?.url
-                  //   })()
-                  // }
-                  // if (!modObj[key]) {
-                  //   modObj[key] = []
-                  // }
-                  // modObj[key].push(modeToConcat)
+                  const key = surface.mode
+                  const modeToConcat = {
+                    mesh: surface.url,
+                    hemisphere: surface.hemisphere,
+                    colormap: (() => {
+                      const lbl = foundP.volumeSrc[tmpl.id][hemisphereKey].find(v => v.volume_type === 'threesurfer/gii-label')
+                      return lbl?.url
+                    })()
+                  }
+                  if (!modObj[key]) {
+                    modObj[key] = []
+                  }
+                  modObj[key].push(modeToConcat)
 
                 }
                 foundP[tmpl.id]
diff --git a/src/viewerModule/threeSurfer/threeSurferGlue/threeSurfer.template.html b/src/viewerModule/threeSurfer/threeSurferGlue/threeSurfer.template.html
index 7a5d51f83..56a25de05 100644
--- a/src/viewerModule/threeSurfer/threeSurferGlue/threeSurfer.template.html
+++ b/src/viewerModule/threeSurfer/threeSurferGlue/threeSurfer.template.html
@@ -5,15 +5,7 @@
 
 <div class="button-container">
 
-  <!-- configurator -->
-  <button mat-icon-button
-    color="primary"
-    [matMenuTriggerFor]="configMenu"
-    class="pe-all">
-    <i class="fas fa-cog"></i>
-  </button>
-
-  <!-- selector -->
+  <!-- selector & configurator -->
   <button mat-icon-button
     color="primary"
     class="pe-all"
@@ -22,9 +14,11 @@
   </button>
 </div>
 
-<!-- config menu -->
-<mat-menu #configMenu="matMenu">
-  <div class="iv-custom-comp text p-2">
+
+<!-- selector/configurator menu -->
+<mat-menu #fsModeSelMenu="matMenu">
+
+  <div class="iv-custom-comp text pl-2 m-2">
     <mat-checkbox *ngFor="let key of allKeys"
       class="d-block"
       iav-stop="click"
@@ -33,10 +27,7 @@
       {{ key.name }}
     </mat-checkbox>
   </div>
-</mat-menu>
-
-<!-- selector menu -->
-<mat-menu #fsModeSelMenu="matMenu">
+  <mat-divider></mat-divider>
   <button *ngFor="let mode of modes"
     mat-menu-item
     (click)="loadMode(mode)"
-- 
GitLab