cancelAnnotation(string annotationType)
Use this method to cancel the drawing of an annotation where you mistakenly initiated an annotation draw with the existing startAnnotation() API method.
Undo your action by calling the cancelAnnotation() method, or by pressing the Escape key on the keyboard.
Sample syntax
ViewONE.cancelAnnotation("Text");