From 244ec6626f7b3e64cebd4dea50c0714e1a2f93a6 Mon Sep 17 00:00:00 2001 From: Nicoleta Panaghiu Date: Tue, 18 Jun 2024 16:53:59 +0300 Subject: [PATCH] RED-5108: use default redaction color for redacted image hints. --- apps/red-ui/src/app/models/file/annotation.wrapper.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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 e1985d7bd..5a19d4356 100644 --- a/apps/red-ui/src/app/models/file/annotation.wrapper.ts +++ b/apps/red-ui/src/app/models/file/annotation.wrapper.ts @@ -77,6 +77,10 @@ export class AnnotationWrapper implements IListable { return this.engines.includes(LogEntryEngines.DICTIONARY); } + get isRedactedImageHint() { + return this.IMAGE_HINT && this.superType === SuperTypes.Redaction; + } + get searchKey(): string { return this.id; } @@ -291,7 +295,10 @@ export class AnnotationWrapper implements IListable { } else { const colorKey = annotationEntityColorConfig[annotationWrapper.superType]; const defaultColor = annotationDefaultColorConfig[annotationWrapper.superType]; - annotationWrapper.color = dictionary ? (dictionary[colorKey] as string) : (defaultColors[defaultColor] as string); + annotationWrapper.color = + dictionary && !annotationWrapper.isRedactedImageHint + ? (dictionary[colorKey] as string) + : (defaultColors[defaultColor] as string); } annotationWrapper.entry = logEntry;