NodeNetwork
NodeNetwork copied to clipboard
Is there any way to keep the nodes connected and not disconnect when dragging?
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();
You can derive from
NodeInputViewModel
and overwrite theCreatePendingConnection()
and do something likeif (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.