We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Anntation Constraint is not worked


I want to prevent users from changing the Annotation in Connector arbitrarily. Although I checked the 'ReadOnly' property in AnnotationConstraint, it doesn't work. Is there any other way to prevent Annotation from being changed?

1 Reply

VG Vivisa Ganesan Syncfusion Team March 30, 2023 10:45 AM UTC


We have created the sample for your requirement. If you want to give readOnly annotation constraints for all connectors in the diagram, you can set it in the getConnectorDefaults method. If you need to set constraints for the specified connector, you can define it in the connector itself. Please refer the sample below.




 getConnectorDefaults: (obj) => {

  if( obj.annotations &&  obj.annotations.length>0)


  obj.annotations[0].constraints =  AnnotationConstraints.Default |AnnotationConstraints.ReadOnly




Attachment: Annotation_3099d4ba.zip

Live Chat Icon For mobile
Up arrow icon