Skip to content

Migration guide v2.6.0

Florian Dupuy edited this page Dec 17, 2021 · 1 revision

Intern cell explicit positionning

Starting from this release, you can give position information to intern cells. Therefore, instead of being all at the left of the diagram in an order which cannot be changed, couplers can now be in a specific order, or a coupler can be placed between two feeders, like in following diagram:

screenshot

This feature is available with the RawGraphBuilder class, but not yet directly with the NetworkGraphBuilder through iidm extensions - it will be in a future release. The RawGraphBuilder provided indeed gives you the possibility to give that information on a switch, through createSwitchNode(switchKind, id, fictitious, open, order, direction) method, or to any node with addExtension(node, order, direction). Note that you can provide a null direction or a null order, if one of them is not of interest for your use case. Note that if an intern cell has several nodes with an order, the average value is taken.

CSS variables for colours

From this release, the CSS provided by default are using CSS variables. If you're using the content of the default CSS in your UI, please update it with the new CSS contents. Note that this allowed to remove the DefaultDiagramStyleProvider::isConstantColor(edge) and DefaultDiagramStyleProvider::isConstantColor(node) methods, which were made useless by the fallback values used when the CSS variable is not defined.

In case you're using a custom CSS file, some more details are here provided (in most cases you won't need more info!). The CSS variables introduced are the following:

  • --sld-vl-color, which gives the colour of the voltage level. It can be used to colour the components (stroke and/or fill) or any other part of the diagram. The variable is defined by the classes of type .sld-vlXXtoYY, which are applied when generating the SVG with a DiagramStyleProvider extending AbstractBaseVoltageDiagramStyleProvider (for instance TopologicalStyleProvider or NominalVoltageDiagramStyleProvider). When using it in components.css for a component or a wire we always defined a fallback colour, for instance:
.sld-generator {stroke: var(--sld-vl-color, blue); fill: none}
  • --sld-background-color gives the colour for the background, with a fallback colour of transparent. It is not defined by default, hence the background is transparent by default.

Labels on every nodes

Starting from this release, labels can be added on any type of nodes, even fictitious nodes, like multiterminal nodes. Therefore, you might need to filter out those if you're using a custom DiagramLabelProvider which overrides getNodeLabels(Node node), as this method gets now called on each Node of the underlying graph.