Skip to content
Discussion options

You must be logged in to vote

Hi! Thanks for the question 🙌

You can implement the “click to click” connection creation on the app side without any extra API from f-flow.

A simple approach:

  1. On first click on a connector (for example an output), store it in your local state:
  • pending = { outputId, nodeId }
  • optionally highlight it so the user sees it’s “armed”.
  1. On second click on another connector (for example an input), if pending exists and the pair is valid, just push a new connection into your own connections array:
  • connections.push({ outputId: pending.outputId, inputId })
  • then clear pending.
  1. If the second click is not a connector (or it’s invalid like output to output), you can simply reset pending (or keep …

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@thiagodeavila
Comment options

Answer selected by thiagodeavila
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request This issue represents a new feature or feature request
2 participants