From 7e44bdf1e20d0616cfd7c83cddfea7227de6459e Mon Sep 17 00:00:00 2001 From: Nicoleta Panaghiu Date: Mon, 28 Oct 2024 17:25:09 +0200 Subject: [PATCH] RED-10262: fixed cancel resize. --- .../resize-redaction-dialog.component.ts | 2 +- .../modules/file-preview/services/annotation-actions.service.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/red-ui/src/app/modules/file-preview/dialogs/resize-redaction-dialog/resize-redaction-dialog.component.ts b/apps/red-ui/src/app/modules/file-preview/dialogs/resize-redaction-dialog/resize-redaction-dialog.component.ts index a5b174c13..1d8c4308e 100644 --- a/apps/red-ui/src/app/modules/file-preview/dialogs/resize-redaction-dialog/resize-redaction-dialog.component.ts +++ b/apps/red-ui/src/app/modules/file-preview/dialogs/resize-redaction-dialog/resize-redaction-dialog.component.ts @@ -77,7 +77,7 @@ export class ResizeRedactionDialogComponent extends IqserDialogComponent< save() { const formValue = this.form.getRawValue(); - const updateDictionary = formValue.option.value === ResizeOptions.IN_DOSSIER; + const updateDictionary = formValue.option?.value === ResizeOptions.IN_DOSSIER; super.close({ comment: formValue.comment, 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 e0ca1ef91..020d61af5 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 @@ -329,9 +329,9 @@ export class AnnotationActionsService { async cancelResize(annotationWrapper: AnnotationWrapper) { this._annotationManager.resizingAnnotationId = undefined; this._annotationManager.annotationHasBeenResized = false; + this._annotationManager.deselect(); this._annotationManager.delete(annotationWrapper); await this._annotationDrawService.draw([annotationWrapper], this._skippedService.hideSkipped(), this._state.dossierTemplateId); - this._annotationManager.deselect(); } #generateRectangle(annotationWrapper: AnnotationWrapper) {