Fix all linter errors.
This commit is contained in:
@@ -11,7 +11,6 @@ export class SvgTextIconKeyComponent implements OnInit {
|
||||
@Input() text: string;
|
||||
@Input() icon: string;
|
||||
|
||||
|
||||
private useWidth: number;
|
||||
private useHeight: number;
|
||||
private useX: number;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<tspan
|
||||
*ngFor="let text of texts; let index = index"
|
||||
[attr.x]="spanX"
|
||||
[attr.y]="spanY(index)"
|
||||
[attr.y]="spanYs[index]"
|
||||
dy="0"
|
||||
>{{ text }}</tspan>
|
||||
</svg:text>
|
||||
|
Before Width: | Height: | Size: 305 B After Width: | Height: | Size: 306 B |
@@ -12,15 +12,17 @@ export class SvgTwoLineTextKeyComponent implements OnInit {
|
||||
|
||||
private textY: number;
|
||||
private spanX: number;
|
||||
private spanYs: number[];
|
||||
|
||||
constructor() { }
|
||||
constructor() {
|
||||
this.spanYs = [];
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.textY = this.height / 2;
|
||||
this.spanX = this.width / 2;
|
||||
}
|
||||
|
||||
private spanY(index: number) {
|
||||
return (0.75 - index * 0.5) * this.height;
|
||||
for (let i = 0; i < this.texts.length; ++i) {
|
||||
this.spanYs.push((0.75 - i * 0.5) * this.height);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user