Hi kaludiusz,
Thanks for your interest in Syncfusion products.
1. With regards to your query “I notice that you call
methods MergeControlPoints (or MergePoints) which do this but why?” please note
that the diagram control adds all the points which are located inside the path
of the connector while moving it. The MergeControlPoints (or mergePoints)
methods are used to merge the points which are placed in the line that is removes
unwanted control points which are present in the same line segment of the
connector. These methods are also used to restrict the connector from adding unwanted
line segments to the connector.
2. I want my connector look exactly like on 1.png image. How
can I avoid this?
Currently we don’t have support to establish self-loop connection
for nodes. This has been suspected to be a feature. Please create a DT incident
for your query so that we can update the patch for this feature.
You can create the DT incident from the following link.
http://www.syncfusion.com/account/dashboard
In the interests of maintaining confidentiality, we have a policy of not
sharing patches or otherwise proprietary customer specific information in the
public Forum.
Please let us know if you have any queries.
Regards,
Amsath Ali. M
Hi,
In my case it works but I add a lot of code to create diagram (my own nodes, connectors, controller, etc.) so I can't check if it works whitout my changes.
Best regards
Klaudiusz
Hi Klaudiusz,
Thanks for
your update.
We are
happy to hear that your requirement is achieved. Could you please send us your
Custom “Self Loop” implementation, so that we could check and let you know if
it works without your changes?
Please let
us know if any concern,
Regards,
Ashok
Kumar.
Hi Klaudiusz,
Thanks for
your update.
We are glad
to inform you that we have created a simple sample to achieve your requirement
with our solution. We suggest you to use
diagram.EventSink’s “NodeSelected” Event to achieve your requirement. Please refer the below code snippet attached sample for
your reference.
Here is the code
snippet:
[C#]
foreach (ConnectorBase bs in evtArgs.Node.Edges)
{
//Checking whether the
connector is self-looped
if (bs.FromNode == bs.ToNode)
{
//Adding the self-loop
connector to the selection List
diagram1.Controller.SelectionList.Add(bs);
}
}
Please let
us know if any concern.
Regards,
Ashok
Kumar.