Add MouseAction rendering

This commit is contained in:
Farkas József
2016-10-02 18:42:10 +02:00
parent c382418dbe
commit 58443cefe1
20 changed files with 252 additions and 0 deletions
@@ -0,0 +1 @@
export * from './svg-mouse-click-key';
@@ -0,0 +1,16 @@
<svg:use [attr.xlink:href]="icon" width="20" height="20" x="10" y="25">
</svg:use>
<svg:text
[attr.x]="60"
[attr.y]="0"
[attr.text-anchor]="'middle'"
[attr.font-size]="25">
<tspan dy="34"> Click </tspan>
</svg:text>
<svg:text
[attr.x]="50"
[attr.y]="0"
[attr.text-anchor]="'middle'"
[attr.font-size]="25">
<tspan dy="70"> {{ button }} </tspan>
</svg:text>

After

Width:  |  Height:  |  Size: 403 B

@@ -0,0 +1,19 @@
import { Component, Input, OnInit } from '@angular/core';
import { MapperService } from '../../../../services/mapper.service';
@Component({
selector: 'g[svg-mouse-click-key]',
template: require('./svg-mouse-click-key.html')
})
export class SvgMouseClickKeyComponent implements OnInit {
@Input() button: string;
private icon: string;
constructor(private mapper: MapperService) {
this.icon = this.mapper.getIcon('mouse');
}
ngOnInit() { }
}