Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update annotations tab when switching to a compound without page (DEV-4171) #1997

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading