Hi all,
I'am searching for a method to delete a selected connector programmatically.
I tried the following methods, but the connector will not be removed from the Diagramm:
1. Version
var diagram = $('#DiagramContent').ejDiagram("instance");
var selectedItem = dialog.selectedItems[0]; // The connector was selected by the user
diagram.remove(selectedItem);
diagram.layout();
Because this doesn't work I tried the following:
var diagram = $('#DiagramContent').ejDiagram("instance"); var selectedItem = dialog.selectedItems[0]; // The connector was selected by the user
var cons = $('#DiagramContent').ejDiagram("connectors");
cons.splice($.inArray(conToDelete,cons),1);
diagram.layout();
After I am doing this Version, when I take a look in the model of the diagram, the connectors Array has lost the selected connector, but the diagram always shoes the connector between the nodes. I am using OrganizationalChart as layout type.
Hope that aybody can help me. Thanks in advanced
Andreas