A validation event raised to let you prevent users from adding child nodes to a container.
Namespace: MindFusion.Diagramming
Package: Events.js
JavaScript Copy Code |
---|
var containerChildAdding |
Call getNode and getContainer methods of the provided NodeEventArgs instance to access the relevant nodes. Set the Cancel argument to true to display the stop cursor and indicate that releasing the mouse button at the current position will cancel the operation.
This example prevents creating more than two levels of nested containers:
JavaScript Copy Code |
---|
function onContainerChildAdding(sender, args) |