fixed missing annotations
This commit is contained in:
parent
7758a13a16
commit
832928b293
@ -124,26 +124,28 @@
|
||||
</div>
|
||||
</div>
|
||||
<div *ngFor="let key of filterKeys()">
|
||||
<div class="mat-menu-item flex" (click)="$event.stopPropagation()">
|
||||
<div
|
||||
class="mat-menu-item flex"
|
||||
(click)="setExpanded(key, !expandedFilters[key], $event)"
|
||||
>
|
||||
<div class="arrow-wrapper" *ngIf="hasSubsections(filters[key])">
|
||||
<mat-icon
|
||||
*ngIf="expandedFilters[key]"
|
||||
svgIcon="red:arrow-down"
|
||||
color="accent"
|
||||
(click)="setExpanded(key, false, $event)"
|
||||
>
|
||||
</mat-icon>
|
||||
<mat-icon
|
||||
*ngIf="!expandedFilters[key]"
|
||||
color="accent"
|
||||
svgIcon="red:arrow-right"
|
||||
(click)="setExpanded(key, true, $event)"
|
||||
>
|
||||
</mat-icon>
|
||||
</div>
|
||||
<mat-checkbox
|
||||
[checked]="isChecked(key)"
|
||||
[indeterminate]="isIndeterminate(key)"
|
||||
(click)="$event.stopPropagation()"
|
||||
(change)="
|
||||
setAllFilters(
|
||||
filters[key],
|
||||
|
||||
@ -1,20 +1,28 @@
|
||||
import {ChangeDetectorRef, Component, ElementRef, HostListener, NgZone, OnInit, ViewChild} from '@angular/core';
|
||||
import {ActivatedRoute, Router} from '@angular/router';
|
||||
import {ManualRedactionEntry, ReanalysisControllerService} from '@redaction/red-ui-http';
|
||||
import {AppStateService} from '../../../state/app-state.service';
|
||||
import {Annotations, WebViewerInstance} from '@pdftron/webviewer';
|
||||
import {PdfViewerComponent} from '../pdf-viewer/pdf-viewer.component';
|
||||
import {AnnotationUtils} from '../../../utils/annotation-utils';
|
||||
import {UserService} from '../../../user/user.service';
|
||||
import {debounce} from '../../../utils/debounce';
|
||||
import {
|
||||
ChangeDetectorRef,
|
||||
Component,
|
||||
ElementRef,
|
||||
HostListener,
|
||||
NgZone,
|
||||
OnInit,
|
||||
ViewChild
|
||||
} from '@angular/core';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { ManualRedactionEntry, ReanalysisControllerService } from '@redaction/red-ui-http';
|
||||
import { AppStateService } from '../../../state/app-state.service';
|
||||
import { Annotations, WebViewerInstance } from '@pdftron/webviewer';
|
||||
import { PdfViewerComponent } from '../pdf-viewer/pdf-viewer.component';
|
||||
import { AnnotationUtils } from '../../../utils/annotation-utils';
|
||||
import { UserService } from '../../../user/user.service';
|
||||
import { debounce } from '../../../utils/debounce';
|
||||
import scrollIntoView from 'scroll-into-view-if-needed';
|
||||
import {AnnotationFilters} from '../../../utils/types';
|
||||
import {FiltersService} from '../service/filters.service';
|
||||
import {FileDownloadService} from '../service/file-download.service';
|
||||
import {saveAs} from 'file-saver';
|
||||
import {FileType} from '../model/file-type';
|
||||
import {DialogService} from '../../../dialogs/dialog.service';
|
||||
import {MatDialogRef, MatDialogState} from '@angular/material/dialog';
|
||||
import { AnnotationFilters } from '../../../utils/types';
|
||||
import { FiltersService } from '../service/filters.service';
|
||||
import { FileDownloadService } from '../service/file-download.service';
|
||||
import { saveAs } from 'file-saver';
|
||||
import { FileType } from '../model/file-type';
|
||||
import { DialogService } from '../../../dialogs/dialog.service';
|
||||
import { MatDialogRef, MatDialogState } from '@angular/material/dialog';
|
||||
|
||||
@Component({
|
||||
selector: 'redaction-file-preview-screen',
|
||||
@ -233,6 +241,10 @@ export class FilePreviewScreenComponent implements OnInit {
|
||||
}
|
||||
|
||||
public getDictionary(annotation: Annotations.Annotation): string {
|
||||
const type = AnnotationUtils.getType(annotation);
|
||||
if (type === 'ignore') {
|
||||
return 'ignore';
|
||||
}
|
||||
return AnnotationUtils.getDictionary(annotation);
|
||||
}
|
||||
|
||||
|
||||
@ -91,12 +91,10 @@ export class AnnotationUtils {
|
||||
initialAnnotations: Annotations.Annotation[],
|
||||
addedAnnotations: Annotations.Annotation[]
|
||||
) {
|
||||
initialAnnotations.splice(0, initialAnnotations.length);
|
||||
for (const annotation of addedAnnotations) {
|
||||
if (annotation.Id.indexOf(':') > 0) {
|
||||
const found = initialAnnotations.find((a) => a.Id === annotation.Id);
|
||||
if (!found) {
|
||||
initialAnnotations.push(annotation);
|
||||
}
|
||||
initialAnnotations.push(annotation);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user