Open charliedua opened 3 years ago
Upon further research I have found that we are not handling the copy-paste operations ourselves, this is handled by gg-editor here So I am not sure if we can actually fix this 😕
That is good research. Well isn't that even better? It means that natively it is supported, but we just didn't do it.
I think this should be doable.
No that is actually bad. We cannot change the functionality as it is handled by gg-editor. we are only setting the command in this file The rest is handled by gg-editor We can make changes if we try to clone and edit the gg-editor files but I think that would be too much work. IMO we should just leave the copy-paste functionality as is and consider it as a feature, not a bug?
If we still want to do it then ↓
We can also inherit from the copy.ts file to create a deepCopy.ts which has the same functionality but also saves the arrows. This approach has some benefits from the previous one as we are not reinventing the wheel.
When copying and pasting the nodes the connections between them aren't getting copied.
How to reproduce
Create a simple diagram (2+ nodes) with arrows connecting nodes.
Multi-Select all the nodes
Copy the selected shapes ( optional: and then delete these shapes [ for readability purposes ] )
Now click on the Paste button to paste the copied design.
Observation: The nodes are not connected with arrows