powsybl / powsybl-diagram

SVG diagrams generation: single-line substation diagrams and network graph diagrams
Mozilla Public License 2.0
72 stars 13 forks source link

Refactor the NAD Layout API for nodes with fixed positions. #601

Open So-Fras opened 5 months ago

So-Fras commented 5 months ago

Describe the current behavior

In order to provide fixed Node positions for a layout algorithm, the user must first call Layout > setInitialNodePositions(...) with a map containing Node ids and their respective positions and then fill another set with the Node ids (thanks to the Layout > setNodesWithFixedPosition(...) function) set in order to prevent the algorithm from moving those nodes.

Describe the expected behavior

It would be clearer to have a function Layout > setNodesWithFixedPosition(...) directly taking a Map<String, Point> as an argument.

Describe the motivation

User-friendliness

Extra Information

No response