Hello,
I’m trying to copy/paste a node with some properties as shown below:
I would really like to copy/paste the whole node just as it’s implemented by default, but with one change. The newly created node (with ctrl+c/ctrl+v), should only be changed in the start property as shown above.
I tried to achieve this, by adding a diagram listener as shown below:
this.diagram.addDiagramListener('ClipboardPasted', (e) => {
e.subject.each((p) => {
console.log(p.part.data);
p.part.data.typeAttributes.status.start = false;
})
});
But this seems to change the start property of both, copied and pasted node, even though the console.log
is loging only the pasted node (and not the copied one).
I also tried the ChangedSelection
event, but with the same effect, both changes.
I would be grateful for any advice.
Best regards.