Copy AnotationId to clipboard on ctrl + alt + click

This commit is contained in:
Kilian Schuettler 2024-10-30 09:17:51 +01:00
parent bcfb915d93
commit d66ea4e154

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);
}