From c266a39385fa4a0598cf4d9aa9c6e0b058115f2d Mon Sep 17 00:00:00 2001 From: Valentin Mihai Date: Tue, 4 Apr 2023 17:16:27 +0300 Subject: [PATCH] RED-6240 - changed 'redactionColor' with 'appliedRedactionColor' --- .../app/modules/pdf-viewer/services/annotation-draw.service.ts | 3 +++ .../modules/pdf-viewer/services/readable-redactions.service.ts | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/red-ui/src/app/modules/pdf-viewer/services/annotation-draw.service.ts b/apps/red-ui/src/app/modules/pdf-viewer/services/annotation-draw.service.ts index 724a22a27..1058d4930 100644 --- a/apps/red-ui/src/app/modules/pdf-viewer/services/annotation-draw.service.ts +++ b/apps/red-ui/src/app/modules/pdf-viewer/services/annotation-draw.service.ts @@ -169,6 +169,9 @@ export class AnnotationDrawService { annotation.setCustomData('redactionColor', String(redactionColor)); annotation.setCustomData('annotationColor', String(annotationWrapper.color)); + const appliedRedactionColor = this._defaultColorsService.getColor(dossierTemplateId, 'appliedRedactionColor'); + annotation.setCustomData('appliedRedactionColor', String(appliedRedactionColor)); + return annotation; } diff --git a/apps/red-ui/src/app/modules/pdf-viewer/services/readable-redactions.service.ts b/apps/red-ui/src/app/modules/pdf-viewer/services/readable-redactions.service.ts index f4f7dec66..ee7eb278d 100644 --- a/apps/red-ui/src/app/modules/pdf-viewer/services/readable-redactions.service.ts +++ b/apps/red-ui/src/app/modules/pdf-viewer/services/readable-redactions.service.ts @@ -63,7 +63,7 @@ export class ReadableRedactionsService { (ctx: CanvasRenderingContext2D, pageMatrix, rotation, options) => { const annotation = options.annotation; ctx.globalCompositeOperation = 'source-over'; - ctx.fillStyle = annotation.getCustomData('redactionColor'); + ctx.fillStyle = annotation.getCustomData('appliedRedactionColor'); ctx.fillRect(annotation.getX(), annotation.getY(), annotation.getWidth(), annotation.getHeight()); }, {