From 0ee69c0decf68350c1631c165279eb3c595a7f58 Mon Sep 17 00:00:00 2001 From: Timo Bejan Date: Wed, 17 Nov 2021 19:47:17 +0200 Subject: [PATCH] fixed ocr resize --- .../red-ui/src/app/models/file/annotation.wrapper.ts | 12 +++++++++++- .../components/comments/comments.component.ts | 1 + .../dossier/services/annotation-actions.service.ts | 3 +-- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/apps/red-ui/src/app/models/file/annotation.wrapper.ts b/apps/red-ui/src/app/models/file/annotation.wrapper.ts index 70f517d2e..b7994d106 100644 --- a/apps/red-ui/src/app/models/file/annotation.wrapper.ts +++ b/apps/red-ui/src/app/models/file/annotation.wrapper.ts @@ -130,7 +130,17 @@ export class AnnotationWrapper { } get isSuggestion() { - return this.isSuggestionAdd || this.isSuggestionRemove || this.isSuggestionChangeLegalBasis || this.isSuggestionRecategorizeImage; + return ( + this.isSuggestionAdd || + this.isSuggestionRemove || + this.isSuggestionChangeLegalBasis || + this.isSuggestionRecategorizeImage || + this.isSuggestionResize + ); + } + + get isSuggestionResize() { + return this.superType === 'suggestion-resize'; } get isSuggestionRecategorizeImage() { diff --git a/apps/red-ui/src/app/modules/dossier/components/comments/comments.component.ts b/apps/red-ui/src/app/modules/dossier/components/comments/comments.component.ts index 1aa3c123c..05e0d425c 100644 --- a/apps/red-ui/src/app/modules/dossier/components/comments/comments.component.ts +++ b/apps/red-ui/src/app/modules/dossier/components/comments/comments.component.ts @@ -46,6 +46,7 @@ export class CommentsComponent { this.annotation.comments.push({ text: value, id: commentId, + annotationId: this.annotation.id, user: this._userService.currentUser.id, }); this._input.reset(); diff --git a/apps/red-ui/src/app/modules/dossier/services/annotation-actions.service.ts b/apps/red-ui/src/app/modules/dossier/services/annotation-actions.service.ts index f5a765a0b..2d69accf4 100644 --- a/apps/red-ui/src/app/modules/dossier/services/annotation-actions.service.ts +++ b/apps/red-ui/src/app/modules/dossier/services/annotation-actions.service.ts @@ -393,6 +393,7 @@ export class AnnotationActionsService { const annotationManager = viewer.Core.annotationManager; const viewerAnnotation = annotationManager.getAnnotationById(annotationWrapper.id); viewerAnnotation.ReadOnly = false; + viewerAnnotation.Hidden = false; viewerAnnotation.setRotationControlEnabled(false); annotationManager.redrawAnnotation(viewerAnnotation); annotationManager.selectAnnotation(viewerAnnotation); @@ -469,8 +470,6 @@ export class AnnotationActionsService { value: text, }; - console.log(resizeRequest); - this._processObsAndEmit( this._manualAnnotationService.resizeOrSuggestToResize(annotationWrapper, resizeRequest), annotationWrapper,