linked some APIs
This commit is contained in:
parent
2a627d3ce3
commit
270b216cc9
@ -129,7 +129,7 @@
|
||||
</div>
|
||||
|
||||
<div class="annotation-actions">
|
||||
<button mat-icon-button>
|
||||
<button mat-icon-button (click)="suggestRemoveAnnotation($event, annotation)">
|
||||
<mat-icon svgIcon="red:trash"></mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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();
|
||||
|
||||
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user