diff --git a/src/util/pipes/combineFn.pipe.ts b/src/util/pipes/combineFn.pipe.ts new file mode 100644 index 0000000000000000000000000000000000000000..f3291cc2a903dd0bc39331a8112bfa4d47a5ddae --- /dev/null +++ b/src/util/pipes/combineFn.pipe.ts @@ -0,0 +1,13 @@ +import { Pipe, PipeTransform } from "@angular/core"; + +@Pipe({ + name: 'combineFn', + pure: true +}) +export class CombineFnPipe implements PipeTransform{ + public transform(fns: Function[]): Function{ + return () => { + for (const fn of fns) fn() + } + } +} diff --git a/src/util/pureConstant.service.ts b/src/util/pureConstant.service.ts index 3bc26cba95d82f07fabd8d3c213adbfe2402002d..47a83a47d6de0e16375eea936aebddac33222fe8 100644 --- a/src/util/pureConstant.service.ts +++ b/src/util/pureConstant.service.ts @@ -750,7 +750,7 @@ Raise/track issues at github repo: <a target = "_blank" href = "${this.repoUrl}" const precomputedArr = tmpl._dataset_specs.filter(src => src['@type'] === 'fzj/tmp/volume_type/v0.0.1' && src.volume_type === 'neuroglancer/precomputed') as TVolumeSrc<'neuroglancer/precomputed'>[] let visible = true let tmplNgId: string - let templateImages: TTemplateImage[] = [] + const templateImages: TTemplateImage[] = [] for (const precomputedItem of precomputedArr) { const ngIdKey = MultiDimMap.GetKey(precomputedItem["@id"]) initialLayers[ngIdKey] = { diff --git a/src/util/util.module.ts b/src/util/util.module.ts index 4d817736e98a231bfde294dd19b751fd44f3db63..649508a287e6b1e7a7985dce66232ce274c3f6ba 100644 --- a/src/util/util.module.ts +++ b/src/util/util.module.ts @@ -20,6 +20,7 @@ import { GetPropertyPipe } from "./pipes/getProperty.pipe"; import { FilterArrayPipe } from "./pipes/filterArray.pipe"; import { DoiParserPipe } from "./pipes/doiPipe.pipe"; import { GetFilenamePipe } from "./pipes/getFilename.pipe"; +import { CombineFnPipe } from "./pipes/combineFn.pipe"; @NgModule({ imports:[ @@ -45,6 +46,7 @@ import { GetFilenamePipe } from "./pipes/getFilename.pipe"; FilterArrayPipe, DoiParserPipe, GetFilenamePipe, + CombineFnPipe, ], exports: [ FilterRowsByVisbilityPipe, @@ -66,6 +68,7 @@ import { GetFilenamePipe } from "./pipes/getFilename.pipe"; FilterArrayPipe, DoiParserPipe, GetFilenamePipe, + CombineFnPipe, ] }) diff --git a/src/viewerModule/viewerCmp/viewerCmp.component.ts b/src/viewerModule/viewerCmp/viewerCmp.component.ts index 3134f6e035c31ed7e96f5b063e531e4b9aa41e84..e494f52444163704feddb62690bf2692bfe48c09 100644 --- a/src/viewerModule/viewerCmp/viewerCmp.component.ts +++ b/src/viewerModule/viewerCmp/viewerCmp.component.ts @@ -195,9 +195,12 @@ export class ViewerCmp implements OnDestroy { this.selectedRegions$, this.pliVol$.pipe( startWith([]) - ) + ), + this.viewerMode$.pipe( + startWith(null as string) + ), ]).pipe( - map(([ regions, layers ]) => regions.length === 0 && layers.length === 0) + map(([ regions, layers, viewerMode ]) => regions.length === 0 && layers.length === 0 && !viewerMode) ) @ViewChild('viewerStatusCtxMenu', { read: TemplateRef }) diff --git a/src/viewerModule/viewerCmp/viewerCmp.template.html b/src/viewerModule/viewerCmp/viewerCmp.template.html index 27b7140344ac2b3b5b60c0b5deda2d87f2c8b66c..c07c20bde7f7210dc66b9a7dde0a3f275e671fdc 100644 --- a/src/viewerModule/viewerCmp/viewerCmp.template.html +++ b/src/viewerModule/viewerCmp/viewerCmp.template.html @@ -313,6 +313,17 @@ #toolPanel="annoToolsPanel"> </annotating-tools-panel> </ng-template> + + <ng-template [ngSwitchCase]="ARIA_LABELS.VIEWER_MODE_KEYFRAME"> + + <ng-container *ngTemplateOutlet="tabTmpl_defaultTmpl; context: { + matColor: 'primary', + fontIcon: 'fa-play', + tooltip: 'Annotation list', + click: toggleMatDrawer + }"> + </ng-container> + </ng-template> </ng-container> </div> </ng-template>