powsybl / powsybl-diagram-viewer

Other
2 stars 1 forks source link

Add flag for enabling node moving in network area diagram viewer #80

Closed massimo-ferraro closed 2 months ago

massimo-ferraro commented 3 months 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 area diagram viewer the functionality for moving the nodes is always enabled

What is the new behavior (if this is a feature change)? A flag allows, when instantiating the viewer, to enable or disable the functionality for moving the nodes

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 boolean flag parameter. Examples are provided in the demo/src/diagram-viewers/add-diagrams.js file