AnnotationEventMap Interface
AnnotationEventMap is an interface used to provide type-safe event listeners and is not instantiated or used directly. It maps event names to their corresponding event object types and is consumed by addEventListener to ensure correct typing of listener callbacks.
export declare interface AnnotationEventMap
Remarks
This interface defines the types of events that can be emitted by the annotations system, including events for when annotations are being created and when they have been successfully created.
Fields
annotationCreating
Event emitted when a new annotation is being created.
annotationCreating: AnnotationCreatingEvent;
Field Value
Remarks
This event is fired before the annotation is actually added to the document, allowing listeners to modify or cancel the creation process through the annotation options.
annotationCreated
Event emitted when a new annotation has been successfully created.
annotationCreated: AnnotationCreatedEvent;
Field Value
Remarks
This event is fired after the annotation has been added to the document, providing access to the fully initialized annotation object.