Updating Custom Attribute IDs in Links During Copy Operation #2791
-
IntroductionI've added a custom attribute to a When I use To clarify:
Steps to reproduceNo response Restrictions & ConstraintsNo response Does your question relate to JointJS or JointJS+. Select both if applicable.JointJS, JointJS+ |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
I assume you use the Can you just update the ids when you paste them? For instance: // first paste the clipboard to a tmp graph
const cells = clipboard.pasteElements(new dia.Graph());
updateCustomIds(cells);
// now add modified cells into actual graph
graph.addCells(cells); Note: If you need a map of the original cells to the cloned elements, you could use |
Beta Was this translation helpful? Give feedback.
I assume you use the
ui.Clipboard
plugin.Can you just update the ids when you paste them? For instance:
Note: If you need a map of the original cells to the cloned elements, you could use
graph.cloneSubgraph()
method.