Connecting and disconnecting links

We need a way to achieve the following connection and disconnection features for the user.

The following shows how we want the user to be able to connect to the different nodes.

Step 1:


Step 2:


The following shows how the user should be able to disconnect from the nodes.

Step 1:


Step 2:


Step 3:


Step 4:


We want to know if these above steps can be achieved and how?

For the first one, do you want to links to snap to the ports like the default behavior? That’s what portGravity does. If you don’t want snapping, you’ll need to override findTargetPort to do something custom instead of using portGravity. You could probably make visual changes to the port and the temporary link in a portTargeted function.

For the second one, couldn’t they just select the link they want to relink and then use the RelinkingTool? Having an extra context menu doesn’t seem necessary. If you really want it, you’d probably need to figure out an override for Tool.standardMouseClick. You’ll probably also want to override the RelinkingTool.toHandleArchetype to make the relink handle display how you want.