Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
siibra-explorer
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Xiao Gui
siibra-explorer
Commits
48f9abcd
Unverified
Commit
48f9abcd
authored
2 years ago
by
Xiao Gui
Browse files
Options
Downloads
Patches
Plain Diff
feat: add header to region features
parent
67e9cd29
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/atlasComponents/sapiViews/core/region/region/rich/region.rich.template.html
+22
-86
22 additions, 86 deletions
...piViews/core/region/region/rich/region.rich.template.html
src/features/entry/entry.component.ts
+10
-3
10 additions, 3 deletions
src/features/entry/entry.component.ts
with
32 additions
and
89 deletions
src/atlasComponents/sapiViews/core/region/region/rich/region.rich.template.html
+
22
−
86
View file @
48f9abcd
...
@@ -62,94 +62,30 @@
...
@@ -62,94 +62,30 @@
</readmore-component>
</readmore-component>
</ng-template>
</ng-template>
<!-- header for regional feature -->
<mat-card>
<mat-card-header>
<mat-card-title>
Features anchored to region
</mat-card-title>
<mat-card-subtitle>
Parcellation: {{ parcellation.name }}
</mat-card-subtitle>
<mat-card-subtitle>
Region: {{ region.name }}
</mat-card-subtitle>
</mat-card-header>
<mat-card-content
*ngIf=
"!(featureEntryCmp.busyTallying$ | async) && (featureEntryCmp.totals$ | async) == 0"
class=
"text-muted"
>
No regional features found.
</mat-card-content>
</mat-card>
<sxplr-feature-entry
<sxplr-feature-entry
[template]=
"template"
[template]=
"template"
[parcellation]=
"parcellation"
[parcellation]=
"parcellation"
[region]=
"region"
>
[region]=
"region"
#featureEntryCmp
="
featureEntryCmp
"
>
</sxplr-feature-entry>
</sxplr-feature-entry>
<mat-accordion
class=
"d-block mt-2"
>
<!-- only show dynamic data when strict-local is set to false -->
<ng-template
[ngIf]=
"!environment.STRICT_LOCAL"
>
<!-- connectivity -->
<ng-template
#sxplrSapiviewsFeaturesConnectivityBrowser
>
<!-- <sxplr-sapiviews-features-connectivity-browser
class="pe-all flex-shrink-1"
[region]="region"
[sxplr-sapiviews-features-connectivity-browser-atlas]="atlas"
[sxplr-sapiviews-features-connectivity-browser-parcellation]="parcellation"
[accordionExpanded]="expandedPanel === CONST.CONNECTIVITY"
[types]="hasConnectivityDirective.availableModalities"
>
</sxplr-sapiviews-features-connectivity-browser> -->
</ng-template>
<!-- <ng-container *ngTemplateOutlet="ngMatAccordionTmpl; context: {
title: CONST.CONNECTIVITY,
iconClass: 'fab fa-connectdevelop',
content: sxplrSapiviewsFeaturesConnectivityBrowser,
iavNgIf: hasConnectivityDirective.hasConnectivity
}">
</ng-container> -->
<!-- <div sxplr-sapiviews-features-connectivity-check
[sxplr-sapiviews-features-connectivity-check-atlas]="atlas"
[sxplr-sapiviews-features-connectivity-check-parcellation]="parcellation"
[region]="region"
#hasConnectivityDirective="hasConnectivityDirective">
</div> -->
</ng-template>
</mat-accordion>
</ng-template>
<!-- expansion tmpl -->
<ng-template
#ngMatAccordionTmpl
let-title=
"title"
let-desc=
"desc"
let-iconClass=
"iconClass"
let-iconTooltip=
"iconTooltip"
let-iavNgIf=
"iavNgIf"
let-content=
"content"
>
<mat-expansion-panel
[expanded]=
"activePanelTitles$ | async | includes : title"
[attr.data-opened]=
"expansionPanel.expanded"
[attr.data-mat-expansion-title]=
"title"
(closed)=
"handleExpansionPanelClosedEv(title)"
(afterExpand)=
"handleExpansionPanelAfterExpandEv(title)"
hideToggle
*ngIf=
"iavNgIf"
#expansionPanel
="
matExpansionPanel
"
>
<mat-expansion-panel-header>
<!-- title -->
<mat-panel-title>
{{ title }}
</mat-panel-title>
<!-- desc + icon -->
<mat-panel-description
class=
"sxplr-d-flex sxplr-align-items-center sxplr-justify-content-end"
[matTooltip]=
"iconTooltip"
>
<span
class=
"mr-3"
>
{{ desc }}
</span>
<span
class=
"accordion-icon d-inline-flex justify-content-center"
>
<i
[class]=
"iconClass"
></i>
</span>
</mat-panel-description>
</mat-expansion-panel-header>
<!-- content -->
<ng-template
matExpansionPanelContent
>
<ng-container
*ngTemplateOutlet=
"content; context: {
expansionPanel: expansionPanel
}"
>
</ng-container>
</ng-template>
</mat-expansion-panel>
</ng-template>
</ng-template>
This diff is collapsed.
Click to expand it.
src/features/entry/entry.component.ts
+
10
−
3
View file @
48f9abcd
import
{
AfterViewInit
,
Component
,
OnDestroy
,
QueryList
,
ViewChildren
}
from
'
@angular/core
'
;
import
{
AfterViewInit
,
Component
,
OnDestroy
,
QueryList
,
ViewChildren
}
from
'
@angular/core
'
;
import
{
Store
}
from
'
@ngrx/store
'
;
import
{
Store
}
from
'
@ngrx/store
'
;
import
{
map
,
scan
,
switchMap
}
from
'
rxjs/operators
'
;
import
{
map
,
scan
,
switchMap
,
tap
}
from
'
rxjs/operators
'
;
import
{
SAPI
}
from
'
src/atlasComponents/sapi
'
;
import
{
SAPI
}
from
'
src/atlasComponents/sapi
'
;
import
{
Feature
}
from
'
src/atlasComponents/sapi/sxplrTypes
'
;
import
{
Feature
}
from
'
src/atlasComponents/sapi/sxplrTypes
'
;
import
{
FeatureBase
}
from
'
../base
'
;
import
{
FeatureBase
}
from
'
../base
'
;
...
@@ -34,6 +34,7 @@ export class EntryComponent extends FeatureBase implements AfterViewInit, OnDest
...
@@ -34,6 +34,7 @@ export class EntryComponent extends FeatureBase implements AfterViewInit, OnDest
@
ViewChildren
(
CategoryAccDirective
)
@
ViewChildren
(
CategoryAccDirective
)
catAccDirs
:
QueryList
<
CategoryAccDirective
>
catAccDirs
:
QueryList
<
CategoryAccDirective
>
public
busyTallying$
=
new
BehaviorSubject
<
boolean
>
(
false
)
public
totals$
=
new
BehaviorSubject
<
number
>
(
null
)
public
totals$
=
new
BehaviorSubject
<
number
>
(
null
)
public
features$
=
new
BehaviorSubject
<
Feature
[]
>
([])
public
features$
=
new
BehaviorSubject
<
Feature
[]
>
([])
...
@@ -55,6 +56,7 @@ export class EntryComponent extends FeatureBase implements AfterViewInit, OnDest
...
@@ -55,6 +56,7 @@ export class EntryComponent extends FeatureBase implements AfterViewInit, OnDest
)
)
this
.
#
subscriptions
.
push
(
this
.
#
subscriptions
.
push
(
catAccDirs$
.
pipe
(
catAccDirs$
.
pipe
(
tap
(()
=>
this
.
busyTallying$
.
next
(
true
)),
switchMap
(
catArrDirs
=>
merge
(
switchMap
(
catArrDirs
=>
merge
(
...
catArrDirs
.
map
((
dir
,
idx
)
=>
dir
.
total$
.
pipe
(
...
catArrDirs
.
map
((
dir
,
idx
)
=>
dir
.
total$
.
pipe
(
map
(
val
=>
({
idx
,
val
}))
map
(
val
=>
({
idx
,
val
}))
...
@@ -69,8 +71,13 @@ export class EntryComponent extends FeatureBase implements AfterViewInit, OnDest
...
@@ -69,8 +71,13 @@ export class EntryComponent extends FeatureBase implements AfterViewInit, OnDest
tally
+=
record
[
idx
]
tally
+=
record
[
idx
]
}
}
return
tally
return
tally
})
}),
).
subscribe
(
num
=>
this
.
totals$
.
next
(
num
)),
tap
(
num
=>
{
this
.
busyTallying$
.
next
(
false
)
this
.
totals$
.
next
(
num
)
}),
).
subscribe
(),
catAccDirs$
.
pipe
(
catAccDirs$
.
pipe
(
switchMap
(
catArrDirs
=>
combineLatest
(
switchMap
(
catArrDirs
=>
combineLatest
(
catArrDirs
.
map
(
dir
=>
dir
.
features$
)
catArrDirs
.
map
(
dir
=>
dir
.
features$
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment