jerosoler / Drawflow

Simple flow library 🖥️🖱️
https://jerosoler.github.io/Drawflow/
MIT License
4.42k stars 714 forks source link

How to Name a Port #791

Closed MikeNo007 closed 7 months ago

MikeNo007 commented 7 months ago

converseKarl commented 7 months ago

I don't know what the full question is, but when creating a node, you can specify, ports in and ports out. They always get numbers output_1 ......................output_Nth and same for inputs. JSON is also created which maps to these names and follow on nodes (input and output). Something are tricky but its possible to rebuild these if you delete a connection (with several in the node) or need to reorder. So just run a piece of JS script and renumber them. If you do that, any that are renumbers, must also reflect the node you are connecting with so its input nodes match correctly

Maybe this does not answer your question but the nodes in and out are set names under the cover, and you can dynamically add nodes, or remove or renumber the node_labels, the JSON mapping (for in and out) and any Node your connecting with.

jerosoler commented 7 months ago

View:

MikeNo007 commented 7 months ago

@jerosoler thanks!