powsybl / powsybl-diagram-viewer

Other
2 stars 1 forks source link

Move text nodes in network area diagram #82

Open massimo-ferraro opened 3 weeks ago

massimo-ferraro commented 3 weeks ago

Please check if the PR fulfills these requirements

Does this PR already have an issue describing the problem? no

What kind of change does this PR introduce? feature

What is the current behavior? In the network diagram viewer text nodes cannot be moved by themselves, they just move when moving the corresponding voltage level nodes

What is the new behavior (if this is a feature change)? Text nodes can also be moved by themselves. A callback has been added for having information about the text nodes moved

Does this PR introduce a breaking change or deprecate an API?

If yes, please check if the following requirements are fulfilled

What changes might users need to make in their application due to this PR? (migration steps) The constructor of the NetworkAreaDiagramViewer has a new additional parameter: the callback. An example of callback is provided in the demo/src/diagram-viewers/add-diagrams.js file