powsybl-diagram
powsybl-diagram copied to clipboard
[NAD] StyleProvider direct styling on edges and bus nodes
Please check if the PR fulfills these requirements
- [x] The commit message follows our guidelines
- [x] Tests for the changes have been added (for bug fixes / features)
- [ ] Docs have been added / updated (for bug fixes / features)
Does this PR already have an issue describing the problem? No
What kind of change does this PR introduce? Feature + API renaming
What is the current behavior? Styling can only be done through CSS classes and rules
What is the new behavior (if this is a feature change)? Styling can also be done directly on the bus nodes and edges, overriding the CSS class styling.
Does this PR introduce a breaking change or deprecate an API?
- [x] Yes
- [ ] No
If yes, please check if the following requirements are fulfilled
- [x] The Breaking Change or Deprecated label has been added
- [x] The migration steps are described in the following section
What changes might users need to make in their application due to this PR? (migration steps) These changes impact only users who defined their own StyleProvider. If that's the case, you need to
- rename your implementation of
getNodeStyleClasses(BusNode)
intogetBusNodeStyleClasses(BusNode)
- rename your implementation of
getEdgeInfoStyles
intogetBranchEdgeInfoStyleClasses
and use the givenBranchEdge
instead of the givenEdge
. The part dealing withThreeWtEdge
should be done ingetThreeWtEdgeStyleClasses
mentioned just after - rename your implementation of
getThreeWtNodeStyle
intogetThreeWtEdgeStyleClasses
and use the givenThreeWtEdge
parameters instead of the 2 parametersThreeWtNode
andThreeWtEdge.Side