-
Notifications
You must be signed in to change notification settings - Fork 13
Migration guide v4.6.0
Following:
.sld-arrow-animation-high-speed { --sld-arrow-animation-parameters: 1s infinite linear }
Add:
@keyframes sld-overload-blink-animation {
0%,
80%,
100% {
stroke-width: 1;
}
40% {
stroke: #ffeb3b; /* Yellow for overload */
stroke-width: 2;
}
}
@keyframes sld-overvoltage-blink-animation {
0%,
80%,
100% {
stroke-width: 1;
}
40% {
stroke: #ff5722;
stroke-width: 2;
}
}
@keyframes sld-undervoltage-blink-animation {
0%,
80%,
100% {
stroke-width: 1;
}
40% {
stroke: #00BCD4; /* Blue for undervoltage */
stroke-width: 2;
}
}
.sld-overload {
animation: sld-overload-blink-animation 3s infinite;
}
.sld-vl-overvoltage {
animation: sld-overvoltage-blink-animation 3s infinite;
}
.sld-vl-undervoltage {
animation: sld-undervoltage-blink-animation 3s infinite;
}
The StyleProviderFactory
interface was changed:
Before:
@FunctionalInterface
public interface StyleProviderFactory {
StyleProvider create(Network network);
}
After:
@FunctionalInterface
public interface StyleProviderFactory {
StyleProvider create(Network network, SvgParameters svgParameters);
}
The ElectricalNodeInfo
class has been deleted. BusLegendInfo
is used instead.
It causes some changes in the LabelProvider
interface.
Before:
List<ElectricalNodeInfo> getElectricalNodesInfos(VoltageLevelGraph graph);
After:
List<BusLegendInfo> getBusLegendInfos(VoltageLevelGraph graph);
Classes implementing the LabelProvider
interface have to be fixed to fit with the new function.
NB : BusLegendInfo
is a record, containing itself a new Caption
record class.
In SvgParameters
, some renaming has been done to be consistent with the new BusLegendInfo
class:
isAddNodesInfos()
--> isBusesLegendAdded()
setAddNodesInfos
--> setBusesLegendAdded()
In GraphMetadata
, some renaming has been done to be consistent with the new BusLegendInfo
class:
ElectricalNodeInfoMetadata
--> BusLegendInfoMetadata
addElectricalNodeInfoMetadata(ElectricalNodeInfoMetadata metadata)
--> addBusLegendInfoMetadata(BusLegendInfoMetadata metadata)
ElectricalNodeInfoMetadata getElectricalNodeInfoMetadata(String id)
--> BusLegendInfoMetadata getBusLegendInfoMetadata(String id)
And
@JsonProperty("electricalNodeInfos")
public List<ElectricalNodeInfoMetadata> getElectricalNodeInfoMetadata()
becomes
@JsonProperty("busLegendInfos")
public List<BusLegendInfoMetadata> getBusLegendInfoMetadata()
Before:
.sld-angle, .sld-voltage {font: 10px serif}
After:
.sld-bus-legend-info {font: 10px serif}
Before:
.sld-angle, .sld-voltage {font: 10px serif}
After:
.sld-bus-legend-info {font: 10px serif}
In the Layout
interface, there is a new function to implement:
void setTextNodeFixedPosition(String voltageLevelId, Point topLeft, Point edgeConnection);
In NetworkAreaDiagram
, there are changes in the API.
The draw
functions using the Writer
have now a new Writer
(for metadata) as an argument:
public static void draw(Network network, Writer writer
, Writer metadataWriter
)
public static void draw(Network network, Writer writer
, Writer metadataWriter
, String voltageLevelId, int depth)
public static void draw(Network network, Writer writer
, Writer metadataWriter
, List<String> voltageLevelIds)
public static void draw(Network network, Writer writer
, Writer metadataWriter
, Predicate<VoltageLevel> voltageLevelFilter)
public static void draw(Network network, Writer writer
, Writer metadataWriter
, NadParameters param, Predicate<VoltageLevel> voltageLevelFilter)
\
The drawToString
method is now static
.
The edgesForkAperture
attribute is now in degrees.
The loopEdgesAperture
attribute is now in degrees.