diff --git a/src/ui/topMenu/topMenuCmp/topMenu.components.ts b/src/ui/topMenu/topMenuCmp/topMenu.components.ts index 103062d18308a409572c44a61d39c18ea8925c37..92f65b7268a2760a01f2639b3ecb721edd1f046e 100644 --- a/src/ui/topMenu/topMenuCmp/topMenu.components.ts +++ b/src/ui/topMenu/topMenuCmp/topMenu.components.ts @@ -11,8 +11,7 @@ import { AuthService } from "src/auth"; import { IavRootStoreInterface, IDataEntry } from "src/services/stateStore.service"; import { MatDialog, MatDialogConfig, MatDialogRef } from "@angular/material/dialog"; import { MatBottomSheet } from "@angular/material/bottom-sheet"; -import { CONST, ARIA_LABELS, QUICKTOUR_DESC } from 'common/constants' -import {viewerStateSetViewerMode} from "src/services/state/viewerState/actions"; +import { CONST, QUICKTOUR_DESC } from 'common/constants' import { IQuickTourData } from "src/ui/quickTour/constrants"; @Component({ diff --git a/src/viewerModule/viewerCmp/viewerCmp.component.ts b/src/viewerModule/viewerCmp/viewerCmp.component.ts index 8a3f2d0d544bb4dfba75b9ede81952e6bc4073a4..ff22be0f407c5d114e0956686febae7d0e5c92c1 100644 --- a/src/viewerModule/viewerCmp/viewerCmp.component.ts +++ b/src/viewerModule/viewerCmp/viewerCmp.component.ts @@ -152,11 +152,8 @@ export class ViewerCmp implements OnDestroy { map(v => v.length > 0) ) - public viewerMode: string - public hideUi$: Observable<boolean> = this.store$.pipe( + public viewerMode$: Observable<string> = this.store$.pipe( select(viewerStateViewerModeSelector), - map(h => h === ARIA_LABELS.VIEWER_MODE_ANNOTATING), - distinctUntilChanged(), ) public useViewer$: Observable<TSupportedViewers | 'notsupported'> = combineLatest([ diff --git a/src/viewerModule/viewerCmp/viewerCmp.template.html b/src/viewerModule/viewerCmp/viewerCmp.template.html index 7abdf783b99ee1cbf1c25329ac76f1eed4b1741d..182ad5dd899093fb43efb6d2bbba926cdd1cc144 100644 --- a/src/viewerModule/viewerCmp/viewerCmp.template.html +++ b/src/viewerModule/viewerCmp/viewerCmp.template.html @@ -6,7 +6,7 @@ <layout-floating-container [zIndex]="10"> <!-- Annotation mode --> - <div *ngIf="hideUi$ | async"> + <div *ngIf="(viewerMode$ | async) === ARIA_LABELS.VIEWER_MODE_ANNOTATING"> <mat-drawer-container class="mat-drawer-content-overflow-visible w-100 h-100 position-absolute invisible" [hasBackdrop]="false"> <mat-drawer #annotationDrawer @@ -61,7 +61,7 @@ <!-- top drawer --> <mat-drawer-container - [hidden]="hideUi$ | async" + [hidden]="viewerMode$ | async" [iav-switch-initstate]="false" iav-switch #sideNavTopSwitch="iavSwitch" @@ -168,6 +168,7 @@ <!-- full left drawer --> <mat-drawer-container + [hidden]="viewerMode$ | async" [iav-switch-initstate]="!(alwaysHideMinorPanel$ | async)" iav-switch #sideNavFullLeftSwitch="iavSwitch" @@ -245,7 +246,7 @@ </mat-drawer> <!-- main-content --> - <mat-drawer-content class="visible position-relative" [hidden]="hideUi$ | async"> + <mat-drawer-content class="visible position-relative" [hidden]="viewerMode$ | async"> <iav-layout-fourcorners [iav-layout-fourcorners-cnr-cntr-ngclass]="{'w-100': true}">