Remove initially drawn annotation rectangle
This commit is contained in:
parent
5c17e7727e
commit
d29d29280b
@ -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