Skip to content
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

Decorator attributes are not properly set #519

Open
So-Fras opened this issue May 12, 2023 · 0 comments
Open

Decorator attributes are not properly set #519

So-Fras opened this issue May 12, 2023 · 0 comments
Labels
bug Something isn't working SLD

Comments

@So-Fras
Copy link
Collaborator

So-Fras commented May 12, 2023

Describe the current behavior

In the setDecoratorAttributes method of the DefaultSVGWriter class, the line
List<String> svgNodeSubcomponentStyles = styleProvider.getNodeSubcomponentStyles(graph, node, subComponentName) may call the AbstractVoltageStyleProvider getNodeSubcomponentStyles.

The decorator gets the style of its associated node (a switch node, a feeder node, etc.). This behavior may disturb or bother users.

Moreover, when the node is a FeederNode, the getNodeSubcomponentStyles calls in turn the getSubComponentVoltageLevelInfos method.
That last method was designed for components like two-winding transformers, as the if condition (if (subComponentName.equals(WINDING2))) shows, and not really for decorators.

Describe the expected behavior

In the setDecoratorAttributes method of the DefaultSVGWriter class, a function specific to decorators should be called to retrieve the svgNodeSubComponentStyles, so that the decorator does not end up with the style of its associated node.

Another solution would be to delete this line of code, but this would prevent users from customizing the decorators.

Describe the steps

No response

Environment

No response

Relevant Log Output

No response

Extra Information

No response

@So-Fras So-Fras added bug Something isn't working SLD labels May 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working SLD
Projects
None yet
Development

No branches or pull requests

1 participant