KeyAction Editor Popover first steps.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { Component, OnInit, Input } from '@angular/core';
|
||||
import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
|
||||
|
||||
import {SvgKeyboardKey} from './svg-keyboard-key.model';
|
||||
import {SvgKeyboardKeyComponent} from './svg-keyboard-key.component';
|
||||
@@ -15,14 +15,23 @@ import {KeyAction} from '../../config-serializer/config-items/KeyAction';
|
||||
[width]="key.width" [height]="key.height"
|
||||
[attr.transform]="'translate(' + key.x + ' ' + key.y + ')'"
|
||||
[keyAction]="keyActions[i]"
|
||||
(click)="onKeyClick(i)"
|
||||
/>
|
||||
<popover *ngIf="popOverEnabled"></popover>
|
||||
`,
|
||||
styles:
|
||||
[`
|
||||
:host {
|
||||
position: relative;
|
||||
}
|
||||
`],
|
||||
directives: [SvgKeyboardKeyComponent]
|
||||
})
|
||||
export class SvgModuleComponent implements OnInit {
|
||||
@Input() coverages: any[];
|
||||
@Input() keyboardKeys: SvgKeyboardKey[];
|
||||
@Input() keyActions: KeyAction[];
|
||||
@Output() editKeyActionRequest = new EventEmitter<number>();
|
||||
|
||||
constructor() {
|
||||
this.keyboardKeys = [];
|
||||
@@ -30,4 +39,8 @@ export class SvgModuleComponent implements OnInit {
|
||||
|
||||
ngOnInit() { }
|
||||
|
||||
onKeyClick(index: number): void {
|
||||
this.editKeyActionRequest.emit(index);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user