From c9c05b920bd4802932ab6b7c79e41ff4c9b9d8d5 Mon Sep 17 00:00:00 2001 From: Edi Cziszter Date: Thu, 27 Jan 2022 20:15:55 +0200 Subject: [PATCH] reference grey background when selected --- .../annotation-actions/annotation-actions.component.html | 4 ++-- .../annotation-references-list.component.html | 9 +++++++-- .../annotation-references-list.component.scss | 4 ---- .../annotation-references-list.component.ts | 8 ++++++-- .../annotations-list/annotations-list.component.html | 1 + 5 files changed, 16 insertions(+), 10 deletions(-) diff --git a/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/components/annotation-actions/annotation-actions.component.html b/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/components/annotation-actions/annotation-actions.component.html index 6ce94bc3e..90a83df7a 100644 --- a/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/components/annotation-actions/annotation-actions.component.html +++ b/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/components/annotation-actions/annotation-actions.component.html @@ -88,8 +88,8 @@ >
-
+
-
+
(); + @Input() selectedAnnotations: AnnotationWrapper[]; + @Output() readonly referenceClicked = new EventEmitter(); annotationReferences: AnnotationWrapper[]; constructor(readonly annotationReferencesService: AnnotationReferencesService) {} @@ -23,4 +23,8 @@ export class AnnotationReferencesListComponent implements OnChanges { ngOnChanges(): void { this.annotationReferences = this.fileData.allAnnotations.filter(a => this.annotation.reference.includes(a.annotationId)); } + + isSelected(annotationId: string): boolean { + return this.selectedAnnotations.some(a => a.annotationId === annotationId); + } } diff --git a/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/components/annotations-list/annotations-list.component.html b/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/components/annotations-list/annotations-list.component.html index 8f11088a1..77df13518 100644 --- a/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/components/annotations-list/annotations-list.component.html +++ b/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/components/annotations-list/annotations-list.component.html @@ -50,5 +50,6 @@ [annotation]="annotation" [fileData]="fileData" [file]="file" + [selectedAnnotations]="selectedAnnotations" >