diff --git a/apps/red-ui/src/app/screens/file/file-preview-screen/file-preview-screen.component.html b/apps/red-ui/src/app/screens/file/file-preview-screen/file-preview-screen.component.html
index 7da724bd3..92f683077 100644
--- a/apps/red-ui/src/app/screens/file/file-preview-screen/file-preview-screen.component.html
+++ b/apps/red-ui/src/app/screens/file/file-preview-screen/file-preview-screen.component.html
@@ -129,7 +129,7 @@
-
diff --git a/apps/red-ui/src/app/screens/file/file-preview-screen/file-preview-screen.component.ts b/apps/red-ui/src/app/screens/file/file-preview-screen/file-preview-screen.component.ts
index 56a9b3d12..cd7b047d2 100644
--- a/apps/red-ui/src/app/screens/file/file-preview-screen/file-preview-screen.component.ts
+++ b/apps/red-ui/src/app/screens/file/file-preview-screen/file-preview-screen.component.ts
@@ -257,9 +257,12 @@ export class FilePreviewScreenComponent implements OnInit {
maxWidth: '90vw'
});
+ const parts = annotation.Id.split(':');
+ const annotationId = parts[parts.length-1];
+
dialogRef.afterClosed().subscribe(result => {
if (result) {
- this._manualRedactionControllerService.undo(this.appStateService.activeProjectId, this.appStateService.activeFile.fileId, annotation.Id).subscribe(ok => {
+ this._manualRedactionControllerService.undo(this.appStateService.activeProjectId, this.appStateService.activeFile.fileId, annotationId).subscribe(ok => {
this._notificationService.showToastNotification(this._translateService.instant('manual-redaction.remove-annotation.success.label'), null, NotificationType.SUCCESS);
}, (err) => {
this._notificationService.showToastNotification(this._translateService.instant('manual-redaction.remove-annotation.failed.label', err), null, NotificationType.ERROR);
diff --git a/apps/red-ui/src/app/screens/file/manual-redaction-dialog/manual-redaction-dialog.component.ts b/apps/red-ui/src/app/screens/file/manual-redaction-dialog/manual-redaction-dialog.component.ts
index a9c0cf5cf..e306af777 100644
--- a/apps/red-ui/src/app/screens/file/manual-redaction-dialog/manual-redaction-dialog.component.ts
+++ b/apps/red-ui/src/app/screens/file/manual-redaction-dialog/manual-redaction-dialog.component.ts
@@ -49,6 +49,9 @@ export class ManualRedactionDialogComponent implements OnInit {
saveManualRedaction() {
const mre = Object.assign({}, this.addRedactionRequest);
this._enhanceManualRedaction(mre);
+ // mre.comment = {
+ // text: 'Lorem ipsum'
+ // };
this._manualRedactionControllerService.addRedaction(mre, this._appStateService.activeProject.project.projectId, this._appStateService.activeFile.fileId).subscribe(ok => {
this._notificationService.showToastNotification(this._translateService.instant('manual-redaction.dialog.add-redaction.success.label'), null, NotificationType.SUCCESS);
this.dialogRef.close();
diff --git a/apps/red-ui/src/app/screens/file/pdf-viewer/pdf-viewer.component.ts b/apps/red-ui/src/app/screens/file/pdf-viewer/pdf-viewer.component.ts
index 4d8ec5b40..d8d5dbe5c 100644
--- a/apps/red-ui/src/app/screens/file/pdf-viewer/pdf-viewer.component.ts
+++ b/apps/red-ui/src/app/screens/file/pdf-viewer/pdf-viewer.component.ts
@@ -143,13 +143,17 @@ export class PdfViewerComponent implements OnInit, AfterViewInit, OnDestroy {
}
private toPosition(page: number, selectedQuad: any): Rectangle {
+ console.log(selectedQuad);
+
+ const pageHeight = this.wvInstance.docViewer.getPageHeight(page);
+ const height = selectedQuad.y2 - selectedQuad.y4;
return {
page: page,
topLeft: {
x: selectedQuad.x4,
- y: selectedQuad.y4
+ y: pageHeight - (selectedQuad.y4 + height)
},
- height: selectedQuad.y2 - selectedQuad.y4,
+ height: height,
width: selectedQuad.x3 - selectedQuad.x4
}
}