Dragging Multiple Links

It seems I’m unable to move multiple unconnected links if I don’t also have a node selected, and noticed the same in the draggable-link demo… Is there a tool/something I can override to implement this?

Thanks
Ryan

Normally the DraggingTool requires a Node that CanMove().
Maybe we should change that when DraggingTool.DraggableLinks is true.

[code] public class CustomDraggingTool : DraggingTool {
public CustomDraggingTool() {
this.DraggableLinks = true;
}

protected override bool MayMove() {
  Diagram diagram = this.Diagram;
  if (diagram == null || diagram.IsReadOnly || !diagram.AllowMove) return false;
  foreach (Part part in diagram.SelectedParts) {
    if (part.CanMove()) {  // normally this only checks Nodes for CanMove()
      return true;
    }
  }
  return false;
}

}[/code]
But note that only when there is one Link (the DraggingTool.DraggedLink) that it will be automatically hooked up to ports that either end is dragged over and dropped onto.

Where does the linking happen when a link is dropped onto an open port? We have some properties we want to be able to clear when an unconnected link is connected a node with the dragging tool.

Thanks
Ryan

You can check for a Model Changed event where ModelChangedEventArgs.Changed == ModelChange.ChangedLinkFromPort or .ChangedLinkToPort.