Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how can distribute flow in 2 part #860

Open
parthsavaliya1 opened this issue Apr 30, 2024 · 4 comments
Open

how can distribute flow in 2 part #860

parthsavaliya1 opened this issue Apr 30, 2024 · 4 comments

Comments

@parthsavaliya1
Copy link

parthsavaliya1 commented Apr 30, 2024

I have a different types of node like Node 1, Node 2, Node 3 etc. but when i create break type node(Node -2) at that time is there 2 output (you can check in screenshot) and 2 plus button to add new node after this (type break) node. when i click on right side plus button at that time new node should be add right side output dot. like my new node is node 3 after node 2 and again i add one node after node 3 then new node should be add after node 3. like whenever i click on bottom plus button at that time only add node in bottom / and again if node type is break then node is insert after node -5 node then same flow should be working. how can i achieve this. and i also need to get node from where my flow is in two parts.
Screenshot from 2024-04-30 10-45-24
This is my first screen shot
Screenshot from 2024-04-30 10-44-27
this is second screen shot

@parthsavaliya1 parthsavaliya1 changed the title How to create connection when there is 2 output how can distribute flow in 2 part Apr 30, 2024
@parthsavaliya1
Copy link
Author

@jerosoler Can you please help here?

@jerosoler
Copy link
Owner

I do not understand your question.

@parthsavaliya1
Copy link
Author

parthsavaliya1 commented May 2, 2024

@jerosoler When I add node which type is break(Node 2 in first Image) .At that time in that node there is 2 output. you can check in my second image node 2 has 2 output . i want to get how many node is connected with node 2 from bottom and how many node connected with node 2 from right side.also if i again add node which type break after node 2 (in above example node 5 - type break) then again i want to get all node to connected with node 6 from bottom and right.

@jerosoler
Copy link
Owner

You can get the information of a node:

editor.getNodeFromId(5);

You will only see the outputs of the first node. But you can call the same function again to see the child nodes until you finish.

You can add and remove connections with the methods: addConnection and removeSingleConnection.

You can listen to events to see if a new connection is created.
Events that may be of help to you:

  • connectionCreated
  • connectionRemoved
  • nodeCreated
  • nodeRemoved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants