Copy AnotationId to clipboard on ctrl + alt + click
This commit is contained in:
parent
bcfb915d93
commit
d66ea4e154
@ -15,6 +15,7 @@ import { JsonPipe, NgForOf, NgIf } from '@angular/common';
|
|||||||
import { HighlightsSeparatorComponent } from '../highlights-separator/highlights-separator.component';
|
import { HighlightsSeparatorComponent } from '../highlights-separator/highlights-separator.component';
|
||||||
import { AnnotationWrapperComponent } from '../annotation-wrapper/annotation-wrapper.component';
|
import { AnnotationWrapperComponent } from '../annotation-wrapper/annotation-wrapper.component';
|
||||||
import { AnnotationReferencesListComponent } from '../annotation-references-list/annotation-references-list.component';
|
import { AnnotationReferencesListComponent } from '../annotation-references-list/annotation-references-list.component';
|
||||||
|
import { Clipboard } from '@angular/cdk/clipboard';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'redaction-annotations-list',
|
selector: 'redaction-annotations-list',
|
||||||
@ -54,11 +55,15 @@ export class AnnotationsListComponent extends HasScrollbarDirective {
|
|||||||
private readonly _annotationManager: REDAnnotationManager,
|
private readonly _annotationManager: REDAnnotationManager,
|
||||||
private readonly _listingService: AnnotationsListingService,
|
private readonly _listingService: AnnotationsListingService,
|
||||||
readonly annotationReferencesService: AnnotationReferencesService,
|
readonly annotationReferencesService: AnnotationReferencesService,
|
||||||
|
private readonly clipboard: Clipboard,
|
||||||
) {
|
) {
|
||||||
super(_elementRef);
|
super(_elementRef);
|
||||||
}
|
}
|
||||||
|
|
||||||
annotationClicked(annotation: AnnotationWrapper, $event: MouseEvent): void {
|
annotationClicked(annotation: AnnotationWrapper, $event: MouseEvent): void {
|
||||||
|
if ($event.ctrlKey && $event.altKey) {
|
||||||
|
this.clipboard.copy(annotation.id);
|
||||||
|
}
|
||||||
if (this._userPreferenceService.isIqserDevMode) {
|
if (this._userPreferenceService.isIqserDevMode) {
|
||||||
console.log('Selected Annotation:', annotation);
|
console.log('Selected Annotation:', annotation);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user