From ce81779fdf81bba09dfdf8c45fe87d09534e2be4 Mon Sep 17 00:00:00 2001 From: Dan Percic Date: Tue, 19 Apr 2022 17:44:51 +0300 Subject: [PATCH] RED-3617: resize imported redactions as rectangles --- .../annotation-actions/annotation-actions.component.ts | 2 +- .../modules/file-preview/services/annotation-actions.service.ts | 2 +- libs/common-ui | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/red-ui/src/app/modules/file-preview/components/annotation-actions/annotation-actions.component.ts b/apps/red-ui/src/app/modules/file-preview/components/annotation-actions/annotation-actions.component.ts index c3a3e554a..4ec11bb2a 100644 --- a/apps/red-ui/src/app/modules/file-preview/components/annotation-actions/annotation-actions.component.ts +++ b/apps/red-ui/src/app/modules/file-preview/components/annotation-actions/annotation-actions.component.ts @@ -119,7 +119,7 @@ export class AnnotationActionsComponent implements OnChanges { } resize($event: MouseEvent) { - this.annotationActionsService.resize($event, this.annotations[0]); + return this.annotationActionsService.resize($event, this.annotations[0]); } acceptResize($event: MouseEvent) { diff --git a/apps/red-ui/src/app/modules/file-preview/services/annotation-actions.service.ts b/apps/red-ui/src/app/modules/file-preview/services/annotation-actions.service.ts index 4319d4a19..a5cbc9e85 100644 --- a/apps/red-ui/src/app/modules/file-preview/services/annotation-actions.service.ts +++ b/apps/red-ui/src/app/modules/file-preview/services/annotation-actions.service.ts @@ -392,7 +392,7 @@ export class AnnotationActionsService { annotationWrapper.resizing = true; const viewerAnnotation = this._pdf.annotationManager.getAnnotationById(annotationWrapper.id); - if (annotationWrapper.rectangle) { + if (annotationWrapper.rectangle || annotationWrapper.imported) { this._pdf.deleteAnnotations([annotationWrapper.id]); const rectangleAnnotation = this.#generateRectangle(annotationWrapper); this._pdf.annotationManager.addAnnotation(rectangleAnnotation, { imported: true }); diff --git a/libs/common-ui b/libs/common-ui index 6a0e22e68..d8c2a342b 160000 --- a/libs/common-ui +++ b/libs/common-ui @@ -1 +1 @@ -Subproject commit 6a0e22e68441a1dbbaaa38cfebed1aa8e8bb91be +Subproject commit d8c2a342baa6acb330132c44000562bdd823f620