Hi,
It sounds like you are wanting to get the area of a polygon annotation when users are drawing it.
To do this, you can listen to the mouseMove event of docViewer. Then inside the event callback you can use docViewer.getToolMode to get the current tool. Once you have checked the current tool is the polygon tool, you can access the drawing annotation by tool.annotation
. Now since you have the annotation
object you can use getPath and do calculations to get the area.
Best Regards,
Zhijie Zhang