Pull request #75: Remove initially drawn annotation rectangle
Merge in RED/ui from RED-887 to master * commit 'd29d29280be4fb1f9f6d4a8452e16098e9df3928': Remove initially drawn annotation rectangle
This commit is contained in:
commit
8d202b35ba
@ -211,6 +211,8 @@ export class FilePreviewScreenComponent implements OnInit, OnDestroy {
|
||||
this.ngZone.run(() => {
|
||||
this._dialogRef = this._dialogService.openManualRedactionDialog($event, async (response: ManualAnnotationResponse) => {
|
||||
if (response?.annotationId) {
|
||||
const annotation = this.activeViewer.annotManager.getAnnotationById(response.manualRedactionEntryWrapper.rectId);
|
||||
this.activeViewer.annotManager.deleteAnnotation(annotation);
|
||||
this.fileData.fileStatus = await this.appStateService.reloadActiveFile();
|
||||
this._cleanupAndRedrawManualAnnotations(response.annotationId);
|
||||
}
|
||||
|
||||
@ -5,6 +5,7 @@ export class ManualRedactionEntryWrapper {
|
||||
public readonly quads: any,
|
||||
public readonly manualRedactionEntry: ManualRedactionEntry,
|
||||
public readonly type: 'DICTIONARY' | 'REDACTION' | 'FALSE_POSITIVE',
|
||||
public readonly annotationType: 'TEXT' | 'RECTANGLE' = 'TEXT'
|
||||
public readonly annotationType: 'TEXT' | 'RECTANGLE' = 'TEXT',
|
||||
public readonly rectId?: string
|
||||
) {}
|
||||
}
|
||||
|
||||
@ -211,7 +211,7 @@ export class PdfViewerComponent implements OnInit, AfterViewInit, OnChanges {
|
||||
this.instance.disableElements(['shapeToolGroupButton']);
|
||||
this.instance.enableElements(['shapeToolGroupButton']);
|
||||
// dispatch event
|
||||
this.manualAnnotationRequested.emit(new ManualRedactionEntryWrapper([quad], mre, 'REDACTION', 'RECTANGLE'));
|
||||
this.manualAnnotationRequested.emit(new ManualRedactionEntryWrapper([quad], mre, 'REDACTION', 'RECTANGLE', activeAnnotation.Id));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user