Hi,
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.
Code-snippet
getConnectorDefaults
getConnectorDefaults: (obj) => {
if( obj.annotations &&
obj.annotations.length>0)
{
obj.annotations[0].constraints =
AnnotationConstraints.Default |AnnotationConstraints.ReadOnly
}
},
|
Attachment:
Annotation_3099d4ba.zip