Wouterdek/NodeNetwork

Is there any way to keep the nodes connected and not disconnect when dragging?

Ptkatz opened this issue · 2 comments

Ptkatz commented

I don't want the connected nodes to disconnect,I used this method, but it still disconnects when dragging the port.

node2Input.Port.ConnectionDragStarted.Subscribe(s =>
{ node2Input.Port.OnPortEnter(); });

You can derive from NodeInputViewModel and overwrite the CreatePendingConnection() and do something like

if (MaxConnections == 1 && Connections.Items.Any())
    return;
base.CreatePendingConnection();
Ptkatz commented

You can derive from NodeInputViewModel and overwrite the CreatePendingConnection() and do something like

if (MaxConnections == 1 && Connections.Items.Any())
    return;
base.CreatePendingConnection();

ok, thank you very much.

I have another question, how to make the connecting line of two nodes have an arrow.