Dragging connector annotations

Hello,

I am trying to allow users to drag connector annotations in a diagram with orthogonal connectors.

The annotation appears draggable, but after dropping it always returns to its original position.

I am configuring the annotation as follows:

            const annotation: AnnotationModel = {

                content: getRoleType(item.roletype),

                constraints:

                    AnnotationConstraints.Drag |

                    AnnotationConstraints.Interaction |

                    AnnotationConstraints.Select,

                horizontalAlignment: 'Left',

                verticalAlignment: 'Top',

            };
And the connector constraints are set to:

constraints: ConnectorConstraints.Default & ~(ConnectorConstraints.DragSourceEnd | ConnectorConstraints.DragTargetEnd),

The function that creates the connectors is located in the attached file.
I am using "@syncfusion/ej2-react-diagrams": "^32.1.24"


Is it possible to drag connector annotations and keep their position?
If so, how should this be implemented?

Thank you for your help.


Attachment: getConnectors_b0f55213.txt

3 Replies 1 reply marked as answer

MG Moulidharan Gopalakrishnan Syncfusion Team January 27, 2026 01:13 PM UTC

Hi,

Thanks for reaching out. Based on the update and the code snippet you provided, we tried to replicate the reported behavior where an annotation, after being interacted with and moved, returns to its original position after the drop (mouse up). However, we were not able to reproduce the issue on our side.

Additionally, we confirm that it is possible to drag connector annotations and retain their updated positions. Please refer to the sample we used for testing and the video demonstration attached.

To assist you further, please provide a minimal issue replication sample from your side or modify the sample we previously shared.

Sample link:
https://stackblitz.com/edit/react-yxbsavc7?file=index.js

Regards,
Moulidharan


Marked as answer

PH Petr Herynek January 27, 2026 02:13 PM UTC

Hello,

Thank you for checking and for confirming that dragging connector annotations is supported.

With your sample I was able to identify the cause on my side. The issue was related to using DiagramTools.ZoomPan in tool={DiagramTools.ZoomPan | DiagramTools.Default}

After changing it to tool={DiagramTools.Default} dragging of annotations works correctly.

Thanks for the sample and support.

Regards,
Petr




MG Moulidharan Gopalakrishnan Syncfusion Team January 28, 2026 06:25 AM UTC

Hi Petr Herynek,

 

Thanks for the update! We're glad to hear you identified the cause and that annotation dragging now works correctly after adjusting the tool settings. If you need any further assistance, feel free to reach out. we’re always happy to help.

 

 

Regards,

Moulidharan


Loader.
Up arrow icon