-
Notifications
You must be signed in to change notification settings - Fork 13
Migration guide v3.2.0
If you are using NominalVoltageDiagramStyleProvider
, be aware that it has been moved in this release to package com.powsybl.sld.svg.styles
and renamed to NominalVoltageStyleProvider
. Note that you don't need a network to construct such a provider anymore. Besides, if you were using the highlight line state layoutParameters.setHighlightLineStateStyle(true)
, you should replace
new NominalVoltageDiagramStyleProvider(network);
with
new StyleProvidersList(new NominalVoltageStyleProvider(), new HighlightLineStateStyleProvider(network));
If you are using TopologicalStyleProvider
, be aware that it has been moved in this release to package com.powsybl.sld.svg.styles.iidm
. Besides, if you were using the highlight line state layoutParameters.setHighlightLineStateStyle(true)
, you should replace
new TopologicalStyleProvider(network);
with
new StyleProvidersList(new TopologicalStyleProvider(network), new HighlightLineStateStyleProvider(network));
DiagramStyleProvider
has been renamed to StyleProvider
and moved to package com.powsybl.sld.svg.styles
. The methods name have been renamed:
-
DiagramStyleProvider::getSvgWireStyles
is renamed intoStyleProvider::getEdgeStyles
-
DiagramStyleProvider::getSvgNodeStyles
is renamed intoStyleProvider::getNodeStyles
-
DiagramStyleProvider::getSvgNodeDecoratorStyles
is renamed intoStyleProvider::getNodeDecoratorStyles
-
DiagramStyleProvider::getZoneLineStyles
is renamed intoStyleProvider::getBranchEdgeStyles
-
DiagramStyleProvider::getSvgNodeSubcomponentStyles
is renamed intoStyleProvider::getNodeSubcomponentStyles
-
StyleProvider::getBusInfoStyle
should now return aList<String>
instead of anOptional<String>
-
BasicStyleProvider
has been moved to packagecom.powsybl.sld.svg.styles
, -
AbstractBaseVoltageDiagramStyleProvider
has been renamed toAbstractVoltageStyleProvider
and moved to packagecom.powsybl.sld.svg.styles
, - a new style provider
AnimatedFeederInfoStyleProvider
for animating arrows of feeder infos has been added - a new abstract basic style provider
AbstractStyleProvider
has been added - a new style provider
StyleProvidersList
has been added to have multiple style providers at once
If you were using id escaping methods which were in DiagramStyles
utility class, these methods have been moved to com.powsybl.sld.util.IdUtil
in this release.
If you are using style classes constants which were in DiagramStyles
utility class, this class has been renamed to com.powsybl.sld.svg.styles.StyleClassConstants
in this release.
The highlightLineStateStyle
parameter in LayoutParameters
has been removed and replaced by a style provider class HighlightLineStateStyleProvider
. As mentioned above, if you were using a TopologicalStyleProvider
with layoutParameters.setHighlightLineStateStyle(true)
, you should replace
new NominalVoltageDiagramStyleProvider(network);
with
new StyleProvidersList(new NominalVoltageStyleProvider(), new HighlightLineStateStyleProvider(network));
Three library components have been added in this release which were not displayed before, therefore if you're interested by one of them and if you have got your own component library, you should add in that component library:
- a component of componentType
BATTERY
and styleClasssld-battery
for displaying batteries, - a component of componentType
UNKNOWN_COMPONENT
and styleClasssld-unknown
for displaying a default component if one component is missing in your library, - a component of componentType
ARROW_CURRENT
and styleClasssld-current
for displaying the value of the current as a feeder info.
The styles corresponding to the new components should be added if you're customizing the given CSS, knowing that the CSS provided give the following values:
.sld-battery {stroke: var(--sld-vl-color, blue); fill: none}
.sld-unknown {stroke: none; fill: black}
.sld-feeder-info.sld-current {fill:purple}
.sld-battery {fill: var(--sld-vl-color, blue)}
.sld-unknown {stroke: none; fill: black}
.sld-feeder-info.sld-current {fill:#800080}
Before
.sld-active-power .sld-label {dominant-baseline: middle}
.sld-reactive-power .sld-label {dominant-baseline: middle}
After
.sld-active-power .sld-label {dominant-baseline: mathematical}
.sld-reactive-power .sld-label {dominant-baseline: mathematical}
.sld-current .sld-label {dominant-baseline: mathematical}
The following class styles have been removed:
.nad-active {visibility: visible}
.nad-reactive {visibility: hidden}
The following class style has been added:
.nad-current path {stroke: none; fill: #bd4802}