[ADF-4937] Viewer - Drag and Drop is not operable with keyboard alone (#5126)

* add keyboard event logic

* tests

* fix outline visibility
This commit is contained in:
Cilibiu Bogdan
2019-10-09 19:52:26 +03:00
committed by Denys Vuika
parent e0b1a3fe03
commit 8da16ea1a7
4 changed files with 64 additions and 1 deletions

View File

@@ -1,4 +1,4 @@
<div id="adf-image-container" class="adf-image-container" tabindex="0" role="img" [attr.aria-label]="nameFile" [style.transform]="transform" data-automation-id="adf-image-container">
<div id="adf-image-container" (keydown)="onKeyDown($event)" class="adf-image-container" tabindex="0" role="img" [attr.aria-label]="nameFile" [style.transform]="transform" data-automation-id="adf-image-container">
<img id="viewer-image" [src]="urlFile" [alt]="nameFile" [ngStyle]="{ 'cursor' : isDragged ? 'move': 'default' } " />
</div>