RED-10396 - fixed current page active annotations re evaluation when they are updated
This commit is contained in:
parent
931d311281
commit
ef26003755
@ -8,6 +8,7 @@ import {
|
||||
HostListener,
|
||||
OnDestroy,
|
||||
OnInit,
|
||||
signal,
|
||||
TemplateRef,
|
||||
untracked,
|
||||
viewChild,
|
||||
@ -108,13 +109,17 @@ export class FileWorkloadComponent extends AutoUnsubscribe implements OnInit, On
|
||||
return this.isDocumine && file.excludedFromAutomaticAnalysis && file.workflowStatus !== WorkflowFileStatuses.APPROVED;
|
||||
});
|
||||
protected displayedAnnotations = new Map<number, AnnotationWrapper[]>();
|
||||
readonly activeAnnotations = computed(() => this.displayedAnnotations.get(this.pdf.currentPage()) || []);
|
||||
readonly activeAnnotations = computed(() => {
|
||||
this.#displayedAnnotationsUpdated();
|
||||
return this.displayedAnnotations.get(this.pdf.currentPage()) || [];
|
||||
});
|
||||
protected displayedPages: number[] = [];
|
||||
protected pagesPanelActive = true;
|
||||
protected enabledFilters = [];
|
||||
private readonly _annotationsElement = viewChild<ElementRef>('annotationsElement');
|
||||
private readonly _quickNavigationElement = viewChild<ElementRef>('quickNavigation');
|
||||
readonly #isIqserDevMode = this._userPreferenceService.isIqserDevMode;
|
||||
readonly #displayedAnnotationsUpdated = signal(false);
|
||||
#displayedPagesChanged = false;
|
||||
|
||||
constructor(
|
||||
@ -452,6 +457,7 @@ export class FileWorkloadComponent extends AutoUnsubscribe implements OnInit, On
|
||||
}
|
||||
|
||||
this.displayedAnnotations = this._annotationProcessingService.filterAndGroupAnnotations(annotations, primary, secondary);
|
||||
this.#displayedAnnotationsUpdated.set(true);
|
||||
const pagesThatDisplayAnnotations = [...this.displayedAnnotations.keys()];
|
||||
this.enabledFilters = this.filterService.enabledFlatFilters;
|
||||
if (this.enabledFilters.some(f => f.id === 'pages-without-annotations')) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user