diff --git a/src/res/css/extra_styles.css b/src/res/css/extra_styles.css index 6fbc58d4ccd71a5d75f6c55e7389e63112455b36..69953526d87cad5723faeca41d3768a72fa4588e 100644 --- a/src/res/css/extra_styles.css +++ b/src/res/css/extra_styles.css @@ -603,4 +603,9 @@ mat-icon[fontset="far"] .font-2x { font-size: 200%; -} \ No newline at end of file +} + +.no-max-width +{ + max-width: none!important; +} diff --git a/src/ui/nehubaContainer/nehubaContainer.component.ts b/src/ui/nehubaContainer/nehubaContainer.component.ts index 241907ecd138682823b992c2e405c0326997729c..5aabb59ed9ce68f43f06bf516291138cd4863274 100644 --- a/src/ui/nehubaContainer/nehubaContainer.component.ts +++ b/src/ui/nehubaContainer/nehubaContainer.component.ts @@ -1,7 +1,7 @@ import { Component, ViewChild, ViewContainerRef, ComponentFactoryResolver, ComponentFactory, ComponentRef, OnInit, OnDestroy, ElementRef } from "@angular/core"; import { NehubaViewerUnit, computeDistance } from "./nehubaViewer/nehubaViewer.component"; import { Store, select } from "@ngrx/store"; -import { ViewerStateInterface, safeFilter, CHANGE_NAVIGATION, isDefined, USER_LANDMARKS, ADD_NG_LAYER, REMOVE_NG_LAYER, NgViewerStateInterface, MOUSE_OVER_LANDMARK, SELECT_LANDMARKS, Landmark, PointLandmarkGeometry, PlaneLandmarkGeometry, OtherLandmarkGeometry, getNgIds, getMultiNgIdsRegionsLabelIndexMap, generateLabelIndexId, DataEntry } from "../../services/stateStore.service"; +import { ViewerStateInterface, safeFilter, CHANGE_NAVIGATION, isDefined, ADD_NG_LAYER, REMOVE_NG_LAYER, NgViewerStateInterface, MOUSE_OVER_LANDMARK, SELECT_LANDMARKS, Landmark, PointLandmarkGeometry, PlaneLandmarkGeometry, OtherLandmarkGeometry, getNgIds, getMultiNgIdsRegionsLabelIndexMap, generateLabelIndexId, DataEntry } from "src/services/stateStore.service"; import { Observable, Subscription, fromEvent, combineLatest, merge, of } from "rxjs"; import { filter,map, take, scan, debounceTime, distinctUntilChanged, switchMap, skip, withLatestFrom, buffer, tap, switchMapTo, shareReplay, mapTo, takeUntil } from "rxjs/operators"; import { AtlasViewerAPIServices, UserLandmark } from "../../atlasViewer/atlasViewer.apiService.service"; @@ -656,8 +656,9 @@ export class NehubaContainer implements OnInit, OnDestroy{ : null) ) }else{ - if (this.nehubaViewer && this.nehubaViewer.removeSpatialSearch3DLandmarks instanceof Function) + if (this.nehubaViewer && this.nehubaViewer.removeSpatialSearch3DLandmarks instanceof Function) { this.nehubaViewer.removeSpatialSearch3DLandmarks() + } } }) ) diff --git a/src/ui/nehubaContainer/nehubaViewer/nehubaViewer.component.ts b/src/ui/nehubaContainer/nehubaViewer/nehubaViewer.component.ts index 632afe95980a6da36b072b5a8c40fa86f020b981..7a5ea161b4f423645ed9f725a71aa166e4380457 100644 --- a/src/ui/nehubaContainer/nehubaViewer/nehubaViewer.component.ts +++ b/src/ui/nehubaContainer/nehubaViewer/nehubaViewer.component.ts @@ -1,15 +1,16 @@ import { Component, OnDestroy, Output, EventEmitter, ElementRef, NgZone, Renderer2 } from "@angular/core"; -import 'third_party/export_nehuba/main.bundle.js' -import 'third_party/export_nehuba/chunk_worker.bundle.js' -import { fromEvent, interval, Observable, Subscription } from 'rxjs' -import { AtlasWorkerService } from "../../../atlasViewer/atlasViewer.workerService.service"; -import { buffer, map, filter, debounceTime, take, takeUntil, scan, switchMap, takeWhile } from "rxjs/operators"; -import { AtlasViewerConstantsServices } from "../../../atlasViewer/atlasViewer.constantService.service"; -import { takeOnePipe, identifySrcElement } from "../nehubaContainer.component"; +import { fromEvent, interval, Subscription } from 'rxjs' +import { AtlasWorkerService } from "src/atlasViewer/atlasViewer.workerService.service"; +import { buffer, map, filter, debounceTime } from "rxjs/operators"; +import { AtlasViewerConstantsServices } from "src/atlasViewer/atlasViewer.constantService.service"; +import { takeOnePipe } from "../nehubaContainer.component"; import { ViewerConfiguration } from "src/services/state/viewerConfig.store"; import { pipeFromArray } from "rxjs/internal/util/pipe"; import { getNgIdLabelIndexFromId } from "src/services/stateStore.service"; +import 'third_party/export_nehuba/main.bundle.js' +import 'third_party/export_nehuba/chunk_worker.bundle.js' + /** * no selector is needed, as currently, nehubaviewer is created dynamically */ @@ -725,21 +726,13 @@ export class NehubaViewerUnit implements OnDestroy{ this._s8$ = this.nehubaViewer.mouseOver.segment.subscribe(({segment: segmentId, layer, ...rest})=>{ const {name = 'unnamed'} = layer - if( segmentId && segmentId < 65500 ) { - const map = this.multiNgIdsLabelIndexMap.get(name) - const region = map && map.get(segmentId) - this.mouseoverSegmentEmitter.emit({ - layer, - segment: region, - segmentId - }) - }else{ - this.mouseoverSegmentEmitter.emit({ - layer, - segment: null, - segmentId - }) - } + const map = this.multiNgIdsLabelIndexMap.get(name) + const region = map && map.get(segmentId) + this.mouseoverSegmentEmitter.emit({ + layer, + segment: region, + segmentId + }) }) // nehubaViewer.navigationState.all emits every time a new layer is added or removed from the viewer diff --git a/src/ui/viewerStateController/viewerState.template.html b/src/ui/viewerStateController/viewerState.template.html index 52fdf3a93c24d5d79f092f4dd47a312436ad2c86..b70d3e3780f682979a04fabaf4d65c15ae4e3c42 100644 --- a/src/ui/viewerStateController/viewerState.template.html +++ b/src/ui/viewerStateController/viewerState.template.html @@ -9,6 +9,7 @@ Template </mat-label> <mat-select + panelClass="no-max-width" [value]="(templateSelected$ | async)?.name" (selectionChange)="handleTemplateChange($event)" (openedChange)="focused = $event"> @@ -71,6 +72,7 @@ Parcellation </mat-label> <mat-select + panelClass="no-max-width" (selectionChange)="handleParcellationChange($event)" [value]="(parcellationSelected$ | async)?.name" (openedChange)="focused = $event">