jerosoler / Drawflow

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

Remove the input of the first node #771

Closed JCPreethi closed 8 months ago

JCPreethi commented 9 months ago

Hey jerosoler,

I want to remove the the input icon of the very first node when its dropped from the sidebar. this.drawflow.start(); this.drawflow.force_first_input = true;

This is what i have tried but it must've missed something since its not working. How do i achieve this?

jerosoler commented 9 months ago

Hello,

The force_first_input variable is to be able to create the connection by leaving the mouse over the node i, not the input.

If you want the first node to not have an "input".

When creating the node, pass the input parameter to 0.

editor.addNode(name, inputs, outputs, posx, posy, class, data, html);
JCPreethi commented 9 months ago

Thanks @jerosoler