I also have a palette from which I can drag nodes and groups into my diagram. However, as soon as the object is dragged into myDiagram, a copy is created in the treeView. If I drag my mouse out and back in, another copy is created - and finally upon drop, a third copy is created.
I believe I should be checking to see if the current tool is draggingTool, but when I check, I seem to only be getting back ToolManager (line 378 in codepen)
but I’m not sure why this works. My understanding was that changes made to the nodeDataArray after the diagram has been rendered will not do anything unless the model is re-rendered from the nodeDataArray…
Yes, I noticed that too. That’s because in one Diagram the “temporary” or “transient” side-effects are not being recorded in the UndoManager. But the Model Changed listener is modifying the other Diagram without also making sure those changes are not being recorded.
I’m still looking into this, as I can spare the cycles. This may take a while.