In my view, when two nodes are close to each other and the user clicks on the port, a link is created between the two nodes. How do I turn that off so that they have to drag between the two to create a link?
I haven’t tried this, but you basically have to move the paragraph in JGoView.doMouseDown that calls pickPort and startNewLink into JGoView.doMouseMove in the MouseStateSelection case.
Link searches nearest port and connects automatically
public static void setDefaultPortGravity(int gravity)
- Set the default distance at which a link will snap to a port. This can be set globally, or can be overridden for each JGoView.
Thanks V. Yea that’s what I ended up doing. changed it so that they had to actually drag the link over the node to connect it. :)