-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use min value instead of average value to order bus cells #462
Conversation
Signed-off-by: Sophie Frasnedo <sophie.frasnedo@rte-france.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at previous lines below, it seems that they are unneeded, maybe we can take the opportunity to remove them
Lines 120 to 124 in 2dfc72b
graph.getNodes().stream().filter(node -> node.getDirection() != Direction.UNDEFINED && graph.getCell(node).isPresent()).forEach(node -> { | |
BusCell cell = (BusCell) graph.getCell(node).get(); | |
cell.setDirection(node.getDirection()); | |
node.getOrder().ifPresent(cell::setOrder); | |
}); |
In fact the mentioned lines should be removed but I forgot one thing: you should set the direction of the bus cell inside the |
Signed-off-by: Sophie Frasnedo <sophie.frasnedo@rte-france.com>
…m/powsybl/powsybl-diagram into position_order_logic_modification
...m-core/src/main/java/com/powsybl/sld/layout/positionfromextension/PositionFromExtension.java
Show resolved
Hide resolved
...m-core/src/main/java/com/powsybl/sld/layout/positionfromextension/PositionFromExtension.java
Show resolved
Hide resolved
Kudos, SonarCloud Quality Gate passed! |
Signed-off-by: Sophie Frasnedo sophie.frasnedo@rte-france.com
Please check if the PR fulfills these requirements (please use
'[x]'
to check the checkboxes, or submit the PR and then click the checkboxes)What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
Feature
What is the current behavior? (You can also link to an open issue here)
The position of the cell on the bus bar is determined by the average position numbers of its components.
What is the new behavior (if this is a feature change)?
The position of the cell on the bus bar is determined by the minimum position number among its components.