RED-5707: show preview redactions with 50% opacity

This commit is contained in:
Dan Percic 2022-12-09 15:09:02 +02:00
parent ef5b5bbe95
commit 54e85f7e29

View File

@ -92,10 +92,7 @@ export class FilePreviewScreenComponent
fullScreen = false;
readonly fileId = this.state.fileId;
readonly dossierId = this.state.dossierId;
readonly file$ = this.state.file$.pipe(
tap(file => this._fileDataService.loadAnnotations(file)),
log('file'),
);
readonly file$ = this.state.file$.pipe(tap(file => this._fileDataService.loadAnnotations(file)));
width: number;
@ViewChild('annotationFilterTemplate', {
read: TemplateRef,
@ -764,7 +761,7 @@ export class FilePreviewScreenComponent
private _setAnnotationsOpacity(annotations: Annotation[], restoreToOriginal = false) {
annotations.forEach(annotation => {
annotation['Opacity'] = restoreToOriginal ? parseFloat(annotation.getCustomData('opacity')) : 1;
annotation['Opacity'] = restoreToOriginal ? parseFloat(annotation.getCustomData('opacity')) : 0.5;
});
}