Structural refactoring (#68)

* Moved html in scss to separate files
* Moved components to designated folders
* Moved logic from html to ts
This commit is contained in:
Nejc Zdovc
2016-07-15 19:23:24 +02:00
committed by József Farkas
parent 036c2d0a70
commit baaec669e0
69 changed files with 834 additions and 821 deletions

View File

@@ -0,0 +1,29 @@
import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
import {SvgKeyboardKey} from '../keys/svg-keyboard-key.model';
import {SvgKeyboardKeyComponent} from '../keys/svg-keyboard-key.component';
import {KeyAction} from '../../../../config-serializer/config-items/KeyAction';
@Component({
selector: 'g[svg-module]',
template: require('./svg-module.component.html'),
styles: [require('./svg-module.component.scss')],
directives: [SvgKeyboardKeyComponent]
})
export class SvgModuleComponent implements OnInit {
@Input() coverages: any[];
@Input() keyboardKeys: SvgKeyboardKey[];
@Input() keyActions: KeyAction[];
@Output() editKeyActionRequest = new EventEmitter<number>();
constructor() {
this.keyboardKeys = [];
}
ngOnInit() { }
onKeyClick(index: number): void {
this.editKeyActionRequest.emit(index);
}
}