Bycelium / PyFlow

An open-source tool for visual and modular block programming in python
GNU General Public License v3.0
1.28k stars 54 forks source link

Add a way to add multiple output sockets to a block #246

Closed FabienRoger closed 2 years ago

FabienRoger commented 2 years ago

Right now, there is only a single output socket. This has to change if we want to add the possibility to close some outputs.

What I suggest is adding output sockets, just as the standard flowchart diagram tools do it:

  1. On hover, display an arrow

https://app.diagrams.net/

image

smartdraw.com

image

  1. Clicking on it adds a new socket and starts the "link drawing process"

  2. Sockets are sorted by the x-coordinate of the endpoint of each socket.

  3. Unused sockets (which can exist when the user removes an edge) are automatically removed.

With this system, I suggest removing the possibility to have multiple edges per socket. Click and drag on an existing socket should remove the old edge and create a new one.

What do you think about this?