Fix multiple structural directive bug
This commit is contained in:
@@ -33,13 +33,14 @@ enum LabelTypes {
|
|||||||
[attr.x]="width / 2"
|
[attr.x]="width / 2"
|
||||||
dy="0"
|
dy="0"
|
||||||
>{{ labelSource[0] }}</tspan>
|
>{{ labelSource[0] }}</tspan>
|
||||||
<tspan
|
<template [ngIf]="labelSource.length === 2">
|
||||||
*ngIf="labelSource.length === 2"
|
<tspan
|
||||||
*ngFor="let label of labelSource; let index = index"
|
*ngFor="let label of labelSource; let index = index"
|
||||||
[attr.x]="width / 2"
|
[attr.x]="width / 2"
|
||||||
[attr.y]="(0.75 - index * 0.5) * height"
|
[attr.y]="(0.75 - index * 0.5) * height"
|
||||||
dy="0"
|
dy="0"
|
||||||
>{{ label }}</tspan>
|
>{{ label }}</tspan>
|
||||||
|
</template>
|
||||||
</svg:text>
|
</svg:text>
|
||||||
<svg:use [attr.xlink:href]="labelSource"
|
<svg:use [attr.xlink:href]="labelSource"
|
||||||
[attr.width]="width / 3" [attr.height]="height / 3"
|
[attr.width]="width / 3" [attr.height]="height / 3"
|
||||||
|
|||||||
Reference in New Issue
Block a user