diff --git a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/svg/DirectionalFeederInfo.java b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/svg/DirectionalFeederInfo.java index 1080d279e..8fe8d75ca 100644 --- a/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/svg/DirectionalFeederInfo.java +++ b/single-line-diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/svg/DirectionalFeederInfo.java @@ -43,12 +43,16 @@ public DirectionalFeederInfo(String componentType, double value, DoubleFunction< this.value = value; } - public DirectionalFeederInfo(String componentType, double value, String unit, BiFunction formatter) { - super(componentType, null, formatter.apply(value, unit), null); + public DirectionalFeederInfo(String componentType, double value, String unit, BiFunction formatter, String userDefinedId) { + super(componentType, null, formatter.apply(value, unit), userDefinedId); this.arrowDirection = Objects.requireNonNull(getArrowDirection(value)); this.value = value; } + public DirectionalFeederInfo(String componentType, double value, String unit, BiFunction formatter) { + this(componentType, value, unit, formatter, null); + } + private static LabelProvider.LabelDirection getArrowDirection(double value) { return value > 0 ? LabelProvider.LabelDirection.OUT : LabelProvider.LabelDirection.IN; }