I am using annotation in my project,
when I use polyline the co-ordinates are not coming at where my mouse is and the polyline starts at different location in the documentpolyline.png (198.1 KB)
I recently updated the annotation version from 19.6 to 20.6 and the problem I am facing is the example which I get is coded in angular and I am using jQuery
Could you please share the sample application? We’ll then look into this issue. Or let us know if you face this issue in any of these UI applications.
@Niteen_Jadhav did you updated library version to latest version of GroupDocs.Annotation on your sample ?
UPDATE:
I’ve checked with new version of library (on different browsers) - it is the same. Looks like the issue not
on the library side - the problem is in incorrect mouse coordinates from first click, try to adjust coordinates
@vitaliy.rezchikov we are grateful if we get a sample in jQuery as we are unable to get proper mouse co-ordinates for first and last click.
Awaiting for your kind response.
At least if change coordinates there - polyline will be started from another place.
Then this method called here
// save the startpoint
this.startPoint = this.snapToGrid(this.transformPoint(event.clientX, event.clientY));
So looks like in clientx and clienty we have coordinates of the page, but there should be coordinates of first click.
In offset.x, offset.y, pageXOffset, pageYOffset cames 0. So “this.p.x” and “this.p.y” received page coordinates.
And then this coordinates go to snapToGrid method and we get another coordinates.
as for position calculation on jquery try to check