Links get copied when I copy two nodes

I am using gojs 1.3.6. I am facing an issue regarding copying nodes. If two nodes are connected by a link and if I copy both nodes, link between them is also get copied. I want to avoid that.


When the user copies via control-drag, the DraggingTool automatically includes Links that connect with selected Nodes, unless you set DraggingTool.copiesEffectiveCollection to false. You can set that by either:
myDiagram.toolManager.draggingTool.copiesEffectiveCollection = false;
or when using GraphObject.make to initialize a Diagram:
{ “draggingTool.copiesEffectiveCollection”: false },

But there’s no easy way to customize control-c behavior, because the CommandHandler does not have a property like that of DraggingTool. (But note that CommandHandler.copiesTree corresponds to DraggingTool.dragsTree.) Maybe we should add a CommandHandler property, perhaps called copiesConnectedLinks, to control the behavior of the CommandHandler.copySelection() command.

The only way that I see how you could implement that right now is to override CommandHandler.copyToClipboard, removing unselected Links from the argument collection (if non-null) and then calling the base method.

Currenty I am fine without keyboard support so first solution will work for me. Thank you for your helpful and quick response.