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) {
this.viewerInstance.annotManager.redrawAnnotation(annotations[0]);
}
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? **