Linking Issue

I am encountering an issue when creating links. I am creating my links in the LinkCreated method as follows

[code]
protected void GoView1_LinkCreated(object sender, GoSelectionEventArgs e)
{
GoLink link = e.GoObject as GoLink;

if (link != null)
{
WorkflowStep toNode = (WorkflowStep)link.ToNode;
WorkflowStep fromNode = (WorkflowStep)link.FromNode;
link.ToArrow = true;
link.ToArrowFilled = true;
link.Pen = new Pen(System.Drawing.Color.Green, 2);
link.Brush = new SolidBrush(System.Drawing.Color.Green);
toNode.WFPreviousStepID = fromNode.ID;
}
}
[/code]
The issue I am having is when I start dragging a link from a node (derived from GoBasicNode) and then drop the end of the link in white space of the GoView. The result I was expecting was that no link would be created b/c the ToNode hadn't been set. However, my links are still being created to the nearest node. Is there some check that needs to be done to ensure that the drop operation is occuring within the position of an existing node before the link is created?

You can control that by decreasing the value of GoView.PortGravity.

Perfect, thank you for the quick reply.