Fix multiple structural directive bug

This commit is contained in:
József Farkas
2016-05-06 17:36:13 +02:00
parent 49b64463eb
commit f4338ebe8d

View File

@@ -33,13 +33,14 @@ enum LabelTypes {
[attr.x]="width / 2"
dy="0"
>{{ labelSource[0] }}</tspan>
<tspan
*ngIf="labelSource.length === 2"
*ngFor="let label of labelSource; let index = index"
[attr.x]="width / 2"
[attr.y]="(0.75 - index * 0.5) * height"
dy="0"
>{{ label }}</tspan>
<template [ngIf]="labelSource.length === 2">
<tspan
*ngFor="let label of labelSource; let index = index"
[attr.x]="width / 2"
[attr.y]="(0.75 - index * 0.5) * height"
dy="0"
>{{ label }}</tspan>
</template>
</svg:text>
<svg:use [attr.xlink:href]="labelSource"
[attr.width]="width / 3" [attr.height]="height / 3"