diff --git a/src/ui/nehubaContainer/nehubaContainer.component.ts b/src/ui/nehubaContainer/nehubaContainer.component.ts index 728c89262e46bab96c9a32ce685d5f53106402e6..90cdb2f4f0405fd110fa7170ec19b96c27bfbf63 100644 --- a/src/ui/nehubaContainer/nehubaContainer.component.ts +++ b/src/ui/nehubaContainer/nehubaContainer.component.ts @@ -195,6 +195,7 @@ export class NehubaContainer implements OnInit, OnChanges, OnDestroy { public disableOctantRemoval$: Observable<{ message?: string, mode: boolean }> public handleViewerLoadedEvent(flag: boolean){ + console.log('viewer laoded ev', flag) this.viewerLoaded = flag this.nehubaViewerLoaded.emit(flag) } @@ -468,6 +469,20 @@ export class NehubaContainer implements OnInit, OnChanges, OnDestroy { ? state.layers?.findIndex(l => l.mixability === 'nonmixable') >= 0 : false), ) + + /** + * fixes + * https://github.com/HumanBrainProject/interactive-viewer/issues/800 + */ + this.subscriptions.push( + this.nehubaViewerLoaded.pipe( + debounceTime(500), + filter(v => !v), + ).subscribe(() => { + this.matDrawerMain.close() + this.matDrawerMinor.close() + }) + ) } public useMobileUI$: Observable<boolean>