jerosoler / Drawflow

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

Custom Node #205

Open usama4850 opened 3 years ago

usama4850 commented 3 years ago

Hi I am trying to make a custom node that contains multiple nodes with connnection is it possible?

jerosoler commented 3 years ago

Hi @usama4850

You mean this? https://github.com/jerosoler/Drawflow/issues/93

You could embed drawflow into drawflow maybe. Since it supports multiple editors.

usama4850 commented 3 years ago

I want to make a node that contains 3 nodes and each are connected to each other when i add that node to editor it actually add 3 nodes that are connected to each other

jerosoler commented 3 years ago

You can add 3 nodes at the same time.


const idofnodecreated = editor.addNode(...)
const idofnodecreated2 = editor.addNode(...)
...

addConnection(idofnodecreated, idofnodecreated2, 'output_1', 'input_1');
...
usama4850 commented 3 years ago

now the issue in grouping and perfect positioning of all nodes when user drag and drop on editor

jerosoler commented 3 years ago

Currently you can only select one node and drag one.