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

Edge parts can be stretchable or glued #457

Merged
merged 6 commits into from
Dec 20, 2022
Merged

Edge parts can be stretchable or glued #457

merged 6 commits into from
Dec 20, 2022

Conversation

zamarrenolm
Copy link
Member

Signed-off-by: Luma zamarrenolm@aia.es

Please check if the PR fulfills these requirements (please use '[x]' to check the checkboxes, or submit the PR and then click the checkboxes)

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
Feature

What is the new behavior (if this is a feature change)?
Some parts of the edge drawings are marked as stretchable or glued.
This information helps to update the diagram when the user interacts with it.
In the basic use-case is a user wants to move some node locations and see the effects (immediately) in the diagram.
To provide this kind of interaction, we want to allow the user drag the nodes to their desired positions. The edges connected to the moved node must be updated (if possible, while the user is performing the drag operation).
To be able to properly update the different parts of the edge we label them using two classes:

  • stretchable: this part of the edge drawing can be scaled to fill the new gap between end nodes.
  • glued: this part of the edge is glued to one of the ends of the edge or to its center.

Other information:
Previously the symbol for the transformer was split in two drawings, each one contained in its half edge.
With this change the circle drawings for the transformer symbol are grouped together in an element that then is glued to center of the edge.

Signed-off-by: Luma <zamarrenolm@aia.es>
Signed-off-by: Florian Dupuy <florian.dupuy@rte-france.com>
Signed-off-by: Florian Dupuy <florian.dupuy@rte-france.com>
Signed-off-by: Florian Dupuy <florian.dupuy@rte-france.com>
Signed-off-by: Florian Dupuy <florian.dupuy@rte-france.com>
Signed-off-by: Florian Dupuy <florian.dupuy@rte-france.com>
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

97.4% 97.4% Coverage
0.0% 0.0% Duplication

Copy link
Contributor

@flo-dup flo-dup left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just added some minor modifications:

  • drawEdgeInfo should always add the edge info style, therefore the styles passed as parameters are only additional styles
  • it makes more sense to put the pst arrow in the same svg group as the windings
  • there was one extra svg group in each winding to add the glued center class, but that class can be concatenated to the other classes of the winding
  • the converter station has been forgotten

@flo-dup flo-dup merged commit d2c1fd2 into main Dec 20, 2022
@flo-dup flo-dup deleted the nad_stretchable_glued branch December 20, 2022 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants