We have a problem that after copy/paste groups collapse/expand state is not copied. Can be reproducible on Grouping sample. I tried to implement it by overriding pasteFromClipboard() method but it is not possible to find a match between copied and pasted artifacts. Do you have any suggestions?
Well, as I found out, it only works in the Grouping sample if you disable the automatic creation of member nodes and links (the subgraph) upon expand if there are zero members.
To get that to work, I added a property on the group data (which I called “everExpanded”), that controls whether or not it adds the member nodes and links upon expansion. When it does, it sets the flag to true, preventing a copy from adding members before its gets its expected copy of the original group’s subgraph.