Add svg prefix to avoid future name collision

This commit is contained in:
József Farkas
2016-04-24 11:43:58 +02:00
parent b9b2fcbf84
commit 6c1df933be
7 changed files with 24 additions and 26 deletions

View File

@@ -0,0 +1,32 @@
import { Component, OnInit, Input} from 'angular2/core';
import {SvgKeyboardKey} from './svg-keyboard-key.model';
import {SvgKeyboardKeyComponent} from './svg-keyboard-key.component';
@Component({
selector: 'g[svg-module]',
template:
`
<svg:path *ngFor="#path of coverages" [attr.d]="path.$.d"/>
<svg:g svg-keyboard-key *ngFor="#key of keyboardKeys"
[id]="key.id"
[rx]="key.rx" [ry]="key.ry"
[width]="key.width" [height]="key.height"
[attr.transform]="'translate(' + key.x + ' ' + key.y + ')'"
/>
`,
directives: [SvgKeyboardKeyComponent]
})
export class SvgModuleComponent implements OnInit {
@Input() coverages: any[];
@Input() keyboardKeys: SvgKeyboardKey[];
constructor() {
this.keyboardKeys = [];
}
ngOnInit() {
}
}