Divide svg-keyboard into two components. One with popover and one without it.

This commit is contained in:
József Farkas
2016-05-22 23:38:09 +02:00
parent 3e767d7339
commit ea712c890b
4 changed files with 61 additions and 20 deletions

View File

@@ -2,7 +2,7 @@ import { Component, OnInit, AfterViewInit, Renderer, ViewChildren, QueryList, El
import {Layers} from '../config-serializer/config-items/Layers';
import {SvgKeyboardComponent} from './components/svg-keyboard.component';
import {SvgKeyboardPopoverComponent} from './components/svg-keyboard-popover.component';
import {UhkConfigurationService} from './services/uhk-configuration.service';
@Component({
@@ -24,22 +24,22 @@ import {UhkConfigurationService} from './services/uhk-configuration.service';
</button>
</div>
<div>
<svg-keyboard *ngFor="let layer of layers.elements"
<svg-keyboard-popover *ngFor="let layer of layers.elements"
[moduleConfig]="layer.modules.elements"
(animationend)="onKeyboardAnimationEnd($event)"
hidden>
</svg-keyboard>
</svg-keyboard-popover>
</div>
`,
styles: [require('./main-app.component.scss')],
directives: [SvgKeyboardComponent],
directives: [SvgKeyboardPopoverComponent],
providers: [UhkConfigurationService]
})
export class MainAppComponent implements OnInit, AfterViewInit {
@ViewChildren('baseButton,modButton,fnButton,mouseButton')
buttonsQueryList: QueryList<ElementRef>;
@ViewChildren(SvgKeyboardComponent, { read: ElementRef })
@ViewChildren(SvgKeyboardPopoverComponent, { read: ElementRef })
keyboardsQueryList: QueryList<ElementRef>;
private buttons: ElementRef[];