Is it possible to manipulate the annotation coordinates of a drawn annotations while modifying it?

I am changing the coordinates by calling a drawn annotation for modify. Like -

this.viewerInstance.annotManager.trigger(‘annotationChanged’, [[annotation], ‘modify’, {}]);

Then using let coordinates = annotations[0].getPath(); .I am changing the coordinates and again assigning the modified coordinates to annotation[0].la (coordinates in annotation object) and returning the modified annotation for exportAnnotations() to save. I am also using redraw annotations -

if (this.flipVertical || this.flipHorizontal) {

But after that in webviewer, it looks like this -

But when I reload webviewer and fetch annotations from db, it looks properly as an annotation should look. Here I am using annotations are - AnnotationCreateAreaMeasurement and AnnotationCreatePerimeterMeasurement.

So I want to modify an annotation’s coordinates. Is there any way to do that? A small code snippet/example would be helpful to do this. Or if I can do some workaround to display annotations properly?
**Also Can I get the pdf viewer coordinate so as to restrict user from flipping when coordinates are out of bound/ not visible in viewer? **

Hi there,

I’m having a bit of a hard time recreating this, but can you try calling adjustRect() on the annotation before you redraw it? This will recalculate the bounding box for you.

If this doesn’t work, you might need to calculate the new rect and then call setRect on the annotation and pass in the new rect.

Let me know if this works,