-
Notifications
You must be signed in to change notification settings - Fork 18
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::getSvgWireStylesis renamed intoStyleProvider::getEdgeStyles -
DiagramStyleProvider::getSvgNodeStylesis renamed intoStyleProvider::getNodeStyles -
DiagramStyleProvider::getSvgNodeDecoratorStylesis renamed intoStyleProvider::getNodeDecoratorStyles -
DiagramStyleProvider::getZoneLineStylesis renamed intoStyleProvider::getBranchEdgeStyles -
DiagramStyleProvider::getSvgNodeSubcomponentStylesis renamed intoStyleProvider::getNodeSubcomponentStyles -
StyleProvider::getBusInfoStyleshould now return aList<String>instead of anOptional<String>
-
BasicStyleProviderhas been moved to packagecom.powsybl.sld.svg.styles, -
AbstractBaseVoltageDiagramStyleProviderhas been renamed toAbstractVoltageStyleProviderand moved to packagecom.powsybl.sld.svg.styles, - a new style provider
AnimatedFeederInfoStyleProviderfor animating arrows of feeder infos has been added - a new abstract basic style provider
AbstractStyleProviderhas been added - a new style provider
StyleProvidersListhas 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
BATTERYand styleClasssld-batteryfor displaying batteries, - a component of componentType
UNKNOWN_COMPONENTand styleClasssld-unknownfor displaying a default component if one component is missing in your library, - a component of componentType
ARROW_CURRENTand styleClasssld-currentfor 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}