Multiple Node move operation preventiion

How one can prevent move operation when multiple nodes are selected ?

What I need to do is when multiple nodes from different groups are selected, move operation should be prevented.

Override DraggingTool.canStart to call the super method. If it returns false, return false. Then return whether the this.diagram.selection does not include multiple nodes meeting your criteria that you want to avoid dragging.

https://gojs.net/latest/intro/extensions.html