Merge branch 'annotation-id-bp' into 'release/4.951.x'

Copy AnotationId to clipboard on ctrl + alt + click

See merge request redactmanager/red-ui!675
This commit is contained in:
Kilian Schüttler 2024-11-04 13:39:25 +01:00
commit e084cb6c3b

View File

@ -15,6 +15,7 @@ import { JsonPipe, NgForOf, NgIf } from '@angular/common';
import { HighlightsSeparatorComponent } from '../highlights-separator/highlights-separator.component';
import { AnnotationWrapperComponent } from '../annotation-wrapper/annotation-wrapper.component';
import { AnnotationReferencesListComponent } from '../annotation-references-list/annotation-references-list.component';
import { Clipboard } from '@angular/cdk/clipboard';
@Component({
selector: 'redaction-annotations-list',
@ -54,11 +55,15 @@ export class AnnotationsListComponent extends HasScrollbarDirective {
private readonly _annotationManager: REDAnnotationManager,
private readonly _listingService: AnnotationsListingService,
readonly annotationReferencesService: AnnotationReferencesService,
private readonly clipboard: Clipboard,
) {
super(_elementRef);
}
annotationClicked(annotation: AnnotationWrapper, $event: MouseEvent): void {
if ($event.ctrlKey && $event.altKey) {
this.clipboard.copy(annotation.id);
}
if (this._userPreferenceService.isIqserDevMode) {
console.log('Selected Annotation:', annotation);
}