Hi
I’m using a GoJS diagram together with an instance of go.GraphLinksModel. I’m trying to copy and paste a subtree and preserve the link to the original parent. I’ve set commandHandler.copiesTree = true and this allows me to successfully copy my selected node as well as its children. However, the copied subtree is not linked to the original parent.
In my screenshot, I selected the “Experience 1” node and copy/pasted it. A copy of the subtree was created (Experience 1 (Copy)) but I need it to be linked to the original parent (Journey Satisfaction).
How can I implement this behaviour?
I think i need to override the command handler’s copyToClipboard function (https://gojs.net/latest/api/symbols/CommandHandler.html#copyToClipboard) but I’m not sure how to proceed.
Thanks so much.