Skip to content
Snippets Groups Projects
Commit 3979e5c1 authored by jojohoch's avatar jojohoch
Browse files

[player] Add animation for fixed virtual keyboard

parent d25c8864
No related branches found
No related tags found
No related merge requests found
...@@ -10,14 +10,19 @@ ...@@ -10,14 +10,19 @@
scrollPagesView"></ng-container> scrollPagesView"></ng-container>
</div> </div>
</div> </div>
<app-keyboard *ngIf="keyboardService.isOpen && keyboardService.position === 'right'"
[positionOffset]="0" <app-keyboard
[inputElement]="keyboardService.inputElement" *ngIf="keyboardService.isOpen && keyboardService.position === 'right'"
[position]="keyboardService.position" @keyboardSlideInOut
[preset]="keyboardService.preset" [positionOffset]="0"
(deleteCharacter)="keyboardService.deleterCharacters()" [inputElement]="keyboardService.inputElement"
(enterKey)="keyboardService.enterKey($event)"> [position]="keyboardService.position"
[preset]="keyboardService.preset"
(deleteCharacter)="keyboardService.deleterCharacters()"
(enterKey)="keyboardService.enterKey($event)">
</app-keyboard> </app-keyboard>
</div> </div>
<ng-template #alwaysVisiblePageView> <ng-template #alwaysVisiblePageView>
......
...@@ -6,6 +6,9 @@ import { FormGroup } from '@angular/forms'; ...@@ -6,6 +6,9 @@ import { FormGroup } from '@angular/forms';
import { Subject } from 'rxjs'; import { Subject } from 'rxjs';
import { takeUntil } from 'rxjs/operators'; import { takeUntil } from 'rxjs/operators';
import { TranslateService } from '@ngx-translate/core'; import { TranslateService } from '@ngx-translate/core';
import {
trigger, style, transition, animate
} from '@angular/animations';
import { KeyboardService } from '../../services/keyboard.service'; import { KeyboardService } from '../../services/keyboard.service';
import { NativeEventService } from '../../services/native-event.service'; import { NativeEventService } from '../../services/native-event.service';
import { PlayerConfig } from '../../models/verona'; import { PlayerConfig } from '../../models/verona';
...@@ -14,8 +17,20 @@ import { Page } from '../../../../../common/models/page'; ...@@ -14,8 +17,20 @@ import { Page } from '../../../../../common/models/page';
@Component({ @Component({
selector: 'app-layout', selector: 'app-layout',
templateUrl: './layout.component.html', templateUrl: './layout.component.html',
styleUrls: ['./layout.component.css'] styleUrls: ['./layout.component.css'],
animations: [
trigger('keyboardSlideInOut', [
transition(':enter', [
style({ width: 0 }),
animate(200, style({ width: '*' }))
]),
transition(':leave', [
animate(200, style({ width: 0 }))
])
])
]
}) })
export class LayoutComponent implements OnInit, AfterViewInit, OnDestroy { export class LayoutComponent implements OnInit, AfterViewInit, OnDestroy {
@Input() parentForm!: FormGroup; @Input() parentForm!: FormGroup;
@Input() pages!: Page[]; @Input() pages!: Page[];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment