-
Notifications
You must be signed in to change notification settings - Fork 29
Migration guide v5.3.0
In com.powsybl.diagram.util.layout.algorithms.parameters.BasicForceLayoutParameters, the following methods have been renamed:
-
getRepulsiontogetRepulsionIntensity -
getFrictiontogetFrictionIntensity
Following the changes made in powsybl-core, all references to dangling lines were renamed to boundary lines.
The default force layout algorithm was changed from BasicForceLayout to Atlas2ForceLayout.
If you have tests that check for the SVG generated by NetworkAreaDiagram.Draw by default, the generated SVG will change. You can either:
- change your result files to match the new default (simply replace the old file with the new generated file)
- specify that you want to use
BasicForceLayout:
NadParameters parameters = new NadParameters().setLayoutFactory(new BasicForceLayoutFactory());
NetworkAreaDiagram.draw(network, outputPath, parameters, VoltageLevelFilter.NO_FILTER);To fix the compatibility of the generated SVGs with Safari and JavaFX, instead of having one foreignObject with multiple text boxes inside, we are now back to having multiple foreignObject, each with a single text box inside.
The corresponding CSS has also to be modified, from
foreignObject.nad-text-nodes {
...
}to
.nad-text-nodes foreignObject {
...
}The constructor SvgWriter(SvgParameters, StyleProvider, NadComponentLibrary, EdgeRouting) has been replaced by the new constructor SvgWriter(SvgParameters, NadComponentLibrary, EdgeRouting edgeRouting).
If you used to generate the SVG through the method svgWriter.writeSvg(graph, writer), it is now expected that you call the following method before calling writeSvg: NetworkGraphBuilder.applyStyle(graph, getStyleProvider(network))
The following parameters were added:
-
scaleFactor(default value:1) inLayoutParameters -
doubleArrowsDisplayed(default value:false) inLabelProviderParameters -
doubleArrowShiftFactorArrows(default value:1.5) inSvgParameters -
doubleArrowShiftFactorText(default value:1.8) inSvgParameters -
displayWithAbs(default value:false) inDefaultLabelProvider
-
EdgeInfoEnuminner class has been moved from withincom.powsybl.nad.svg.iidm.DefaultLabelProviderto a separate classcom.powsybl.nad.svg.EdgeInfoEnum. -
EdgeInfoParametersinner record has been moved from withincom.powsybl.nad.svg.iidm.DefaultLabelProviderto a separate recordcom.powsybl.nad.svg.EdgeInfoParameters.
-
cgmesScaleFactorhas been moved fromLayoutParameterstoCgmesSubstationLayoutFactory,CgmesVoltageLevelLayoutFactory,CgmesZoneLayoutFactory -
cgmesDiagramNamehas been moved fromLayoutParameterstoCgmesSubstationLayoutFactory,CgmesVoltageLevelLayoutFactory,CgmesZoneLayoutFactory. Note that his parameter is now optional: when not specified, the first diagram data in the DL is taken. -
cgmesUseNameshas been removed fromLayoutParameters, use parameteruseNameofSvgParameterinstead.
If you're using your own component library, the components metadata needs to be updated , due to vertical-busbars voltage levels (feature available in CGMES DL only so far). You need to specify which transformations to operate (if any) for LEFT and RIGHT components orientation.