Connector Toolbar vs Drag drop


Author
Message
Pramod Sreekanthan
Pramod Sreekanthan
Junior Member (17 reputation)Junior Member (17 reputation)Junior Member (17 reputation)Junior Member (17 reputation)Junior Member (17 reputation)Junior Member (17 reputation)Junior Member (17 reputation)Junior Member (17 reputation)Junior Member (17 reputation)
Group: Forum Members
Posts: 17, Visits: 1

We observe that drag and drop feature differs from that of a tool bar. If a connector(Dynamic HV) is picked from the Connector tool bar and two shapes are connected, it automatically corrects the routing. But if a connector(Dynamic HV) is dropped from the Connector palette and connected, it does not route appropriately..User has to click re-route. I’ve attached the screenshot. How to synchronize the behavior between tool bar and drag drop?

We've handled the issue thourgh EventSink Connected and rerouting the connector. Are there other better ways to handle this?

void EventSinkService_Connected(NConnectionEventArgs args)

{

//Reroute the connector after ports are connected

if (nDrawingView1.Selection.Nodes[0].GetType().Equals(typeof(NRoutableConnector)))

{

NRoutableConnector routableConn = (NRoutableConnector)nDrawingView1.Selection.Nodes[0];

if (routableConn.FromShape != null && routableConn.ToShape != null)

{

routableConn.Reroute();

}

}

}


Attachments
NevronRouting.zip (104 views, 148.00 KB)
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search