Hi there,
In case of adding a new connector by user, I do handle the collection change event and when the state is 'Changing' and type is 'Addition', I validate the source and target nodes. If this action is invalid, I set the cancel property of the event arg to cancel the addition, but it dose not work!
I also tried to use remove method of the diagram object, when the state is 'Changed', but it throws an error to the console:
node.js:1621 Uncaught TypeError: Cannot read property 'wrapper' of undefined
please tell me how to cancel an object addition in case of invalid state, thanks