A validation event that lets you approve or reject connecting a link to an anchor point.
Namespace: MindFusion.Diagramming
File: DiagramBase.js
JavaScript Copy Code |
---|
diagram.validateAnchorPoint.addEventListener(onValidateAnchorPoint); |
Event handlers receive a LinkValidationEventArgs instance containing data about this event.
This event is raised for each point of an AnchorPattern while a link's end point is being moved over a node. If none of the anchor points are validated, the mouse cursor icon changes to NotAllowed, indicating that the link cannot be connected to that node.
When the mouse button is released over a node, the event is raised again for the node's anchor points. From all validated anchor points, the one nearest to the dragged link end point is used to dock the link.
MindFusion.Diagramming for JavaScript Programmer's Guide | © 2024 MindFusion |