Skip to content

Commit

Permalink
fix: update annotations tab when switching to a compound without page (
Browse files Browse the repository at this point in the history
…DEV-4171) (#1997)

Co-authored-by: Irmantas Kaukas <irmastnt@gmail.com>
  • Loading branch information
domsteinbach and irmastnt authored Dec 16, 2024
1 parent 8428d77 commit 1f1b80a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import { BehaviorSubject } from 'rxjs';
export class CompoundService {
compoundPosition!: DspCompoundPosition;

private _incomingResource = new BehaviorSubject<DspResource | undefined>(undefined);
incomingResource$ = this._incomingResource.asObservable();
incomingResource = new BehaviorSubject<DspResource | undefined>(undefined);
incomingResource$ = this.incomingResource.asObservable();

private _resource!: DspResource;

Expand Down Expand Up @@ -48,7 +48,7 @@ export class CompoundService {
const incomingImageRepresentations = res as ReadResourceSequence;

if (incomingImageRepresentations.resources.length === 0) {
this._incomingResource.next(undefined);
this.incomingResource.next(undefined);
return;
}
this._resource.incomingRepresentations = incomingImageRepresentations.resources;
Expand All @@ -75,7 +75,7 @@ export class CompoundService {
}

private _reloadViewer(resource: DspResource) {
this._incomingResource.next(resource);
this.incomingResource.next(resource);
this._cd.detectChanges();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ export class ResourceComponent implements OnChanges {
if (this.isCompoundNavigation) {
this._compoundService.onInit(new DspCompoundPosition(countQuery_.numberOfResults), this.resource);
this._cdr.detectChanges();
} else {
this._compoundService.incomingResource.next(undefined);
}
});
}
Expand Down

0 comments on commit 1f1b80a

Please sign in to comment.