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)
Nevron Support
Nevron Support
Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)
Group: Administrators
Posts: 3.1K, Visits: 4.2K

Hi,

yes, there is a difference ! When you drop the dynamic HV connector from the library you just create it, but when it's created with the tool from the toolbar it is automatically routed. If you want the connector to always reroute according to the obstacles that stand in its way, set its RerouteAutomatically property to Always.



Best Regards,
Nevron Support Team


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