Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Ptkatz opened this issue Apr 1, 2023 · 2 comments

Comments

@Ptkatz
Copy link

Ptkatz commented Apr 1, 2023

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(); });
@FabianNitsche
Copy link
Contributor

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

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

@Ptkatz
Copy link
Author

Ptkatz commented Apr 4, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants