From 7886e6817b830b3566bd13c3219234ef9f28335e Mon Sep 17 00:00:00 2001 From: Xiao Gui <xgui3783@gmail.com> Date: Mon, 19 Jul 2021 12:14:44 +0200 Subject: [PATCH] bugfix: hasconnectivity directive --- .../connectivity/hasConnectivity.directive.ts | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/atlasComponents/connectivity/hasConnectivity.directive.ts b/src/atlasComponents/connectivity/hasConnectivity.directive.ts index c547b715a..b3cf77233 100644 --- a/src/atlasComponents/connectivity/hasConnectivity.directive.ts +++ b/src/atlasComponents/connectivity/hasConnectivity.directive.ts @@ -3,7 +3,6 @@ import {of, Subscription} from "rxjs"; import {switchMap} from "rxjs/operators"; import {BS_ENDPOINT} from "src/util/constants"; import {HttpClient} from "@angular/common/http"; -import {getIdFromKgIdObj} from "common/util"; @Directive({ selector: '[has-connectivity]', @@ -28,11 +27,8 @@ export class HasConnectivity implements OnInit, OnDestroy { checkConnectivity(region) { const {atlas, parcellation, template} = region.context - if (region.id || region.name) { - const regionId = region.id? region.id.kg? getIdFromKgIdObj(region.id.kg) - : region.id : null - - const connectivityUrl = `${this.siibraApiUrl}/atlases/${encodeURIComponent(atlas['@id'])}/parcellations/${encodeURIComponent(parcellation['@id'])}/regions/${encodeURIComponent(regionId || region.name)}/features/ConnectivityProfile` + if (region.name) { + const connectivityUrl = `${this.siibraApiUrl}/atlases/${encodeURIComponent(atlas['@id'])}/parcellations/${encodeURIComponent(parcellation['@id'])}/regions/${encodeURIComponent(region.name)}/features/ConnectivityProfile` this.subscriptions.push( this.httpClient.get<[]>(connectivityUrl).pipe(switchMap((res: any[]) => { -- GitLab