Hi Andrey,
Please enable the AllowDrop constraints for nodes/connectors which shows the highlighter, when we drag the node/connector and mouse hover on the another node/connector. Also use drop event to achieve your requirement and this event triggers when we drag the node/connector and drop it onto another node/connector. Please refer to the code example and modified sample below.
Code example:
//define drop event
eliminationChart.OnClientDrop = "drop";
function drop(args) {
var diagram = $("#EliminationChart").ejDiagram("instance");
if (!args.source.cssClass) {
if (diagram.getObjectType(args.target) == "node") {
if (args.element) {
var connector = diagram.findNode(args.element.inEdges[0]);
}
if (connector) {
diagram.updateConnector(connector.name, { sourceNode: args.target.name, targetNode: args.element.name });
}
else {
diagram.add({ name: "connector" + ej.datavisualization.Diagram.Util.randomId(), segments: [{ type: "orthogonal" }], sourceNode: args.target.name, targetNode: args.element.name });
}
}
}
//update the layout
diagram.layout();
}
Please refer to the KB link below which shows how to perform drag and drop operation in layout.
Regards,
Shyam G