I'm working on a functionality where a certain type of node cannot be dropped on another node. When catching this drop event I call the undo() method. This works fine in most cases, but when a node has been added to the diagram from the symbolPalette and is then dragged and dropped on the other node the undo() action causes the dropped node to be removed from the diagram.
I understand why this is happening, but to circumvent this I want to add a entry to the historyManager containing the initial position of the newly added node. How could I achieve this?