I am trying to figure out how to get information during the “SelectionDeleting” event to know which link(s) a user is deleting. In other words, when a user clicks a link or links in between nodes and hits the delete button, how do i find out which links the user is deleting? I have provide an example of the “SelectionDeleting” event below.
Diagram.addDiagramListener(“SelectionDeleting”,
function(e)
{
<span =“Apple-tab-span” style=“white-space:pre”> //how do i find out what the user is deleting here
for (var iter = diagram.selection.iterator; iter.next(); ) {
var part = iter.value;
if (part instanceof go.Node) {
if (part.data.xyz == 17) { ... }
}
}
Remember not to modify the diagram.selection collection while you are iterating over it.