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