alyssaxuu / flowy

The minimal javascript library to create flowcharts ✨
MIT License
11.48k stars 998 forks source link

Conditional Snapping Issue #134

Open codiastic opened 2 years ago

codiastic commented 2 years ago

There has to be some provision for conditional snapping like If Else condition

I want one drag option of If Else condition which will already have two child blocks called Yes and No attached to one conditional Parent If block.

Can someone help me achieve this goal with the existing flowy code.

What i want is when i drag a single Block from the left on the Canvas it should attach two child blocks to it like "Yes" and "No"

douglasrono commented 2 years ago

My suggestion as well, I'd like to have a test conditional statement on the control flow

AdamMiltonBarker commented 2 months ago

The code here got me to doing what you need to do. I can't share it because ours is a proprietary project, but first I developed a solution similar to the one in the following issue, then used that functionality and some modifications to dragEnd to make it do what you are saying.

https://github.com/alyssaxuu/flowy/issues/148#issuecomment-2347096903