Raised when the user draws a new node.
Namespace: MindFusion.Diagramming
File: DiagramBase.js
JavaScript Copy Code |
---|
diagram.nodeCreated.addEventListener(onNodeCreated); |
Event handlers receive a NodeEventArgs instance containing data about this event.
This example handles the nodeCreated event to set new node's anchorPattern.
JavaScript Copy Code |
---|
diagram.nodeCreated.addEventListener( (sender, args) => { if (sender.defaultShape.id == "Rectangle") args.node.anchorPattern = pattern1; else args.node.anchorPattern = pattern2; }); |
MindFusion.Diagramming for JavaScript Programmer's Guide | © 2024 MindFusion |