How to Restrict Textbox Editing for Group Node in Angular Diagram?
This article explains how to restrict textbox editing for a group node in an Angular Diagram. The Angular Diagram component enables users to edit annotations at runtime, either interactively or through code. To prevent users from modifying annotations, the annotationConstraints property can be utilized.
This property allows control over annotation behavior, such as setting them to read-only. To disable editing, apply the “read-only” constraint to an annotation. This ensures the annotation cannot be altered or edited, even if a user double-clicks a group node.
Below is an example demonstrating how to assign the read-only constraint:
{
id: 'group',
children: ['rectangle1', 'rectangle2'],
style: { fill: 'none', strokeWidth: 0 },
annotations: [{
content: 'Group',
constraints: AnnotationConstraints.ReadOnly,
}],
}
Refer to the working sample for additional details and implementation : Sample
Conclusion
We hope you enjoyed learning how to restrict textbox editing for a group node in Angular Diagram.
To explore additional advanced features, visit the Angular Diagram feature tour page or consult the documentation for quick configuration guidelines. You can also view the Angular Diagram example to understand more about creating and managing data.
For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusion, you can try our 30-day free trial to check out our other controls.
If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forums, BoldDesk Support, or feedback portal. We are always happy to assist you!