Colibrio Reader Framework API - Cloud license
    Preparing search index...

    Interface IReaderViewAnnotationMouseEngineEvent

    EngineEvent used for "annotationClick" and "annotationContextMenu". Fires when a click of contextmenu event occurred on a ReaderViewAnnotation.

    interface IReaderViewAnnotationMouseEngineEvent {
        annotation: IReaderViewAnnotation;
        annotationLayer: IReaderViewAnnotationLayer;
        cancelable: boolean;
        clientX: number;
        clientY: number;
        ctrlKey: boolean;
        defaultPrevented: boolean;
        immediatePropagationStopped: boolean;
        isTrusted: boolean;
        metaKey: boolean;
        pageX: number;
        pageY: number;
        propagationStopped: boolean;
        readerDocumentEventState: ReaderDocumentEventState;
        readerView: IReaderView;
        relativeClientX: number;
        relativeClientY: number;
        relativeScreenX: number;
        relativeScreenY: number;
        screenX: number;
        screenY: number;
        type: keyof IEngineEventTypeMap;
        userGenerated: boolean;
        willEmitDomEvent: boolean;
        preventDefault(): void;
        stopImmediatePropagation(): void;
        stopPropagation(): void;
        toJSON(): IMouseEngineEventData;
    }

    Hierarchy (View Summary)

    Properties

    The annotation this event is related to.

    cancelable: boolean

    If this event's default action is cancelable. See respective engine event for its definition of default action.

    clientX: number

    The X coordinate of the mouse pointer in local (DOM content) coordinates.

    clientY: number

    The Y coordinate of the mouse pointer in local (DOM content) coordinates.

    ctrlKey: boolean

    Returns true if the control key was down when the mouse event was fired.

    defaultPrevented: boolean

    If this event's default action has been canceled/prevented by a call to preventDefault()

    immediatePropagationStopped: boolean

    True if stopImmediatePropagation() was called on this event.

    isTrusted: boolean

    If this event runs in a "trusted" context, i.e. the event callback is executed during a user-generated event such as "click" or "pointerdown".

    metaKey: boolean

    Returns true if the meta key was down when the mouse event was fired.

    pageX: number

    The X coordinate of the mouse pointer relative to the whole document.

    pageY: number

    The Y coordinate of the mouse pointer relative to the whole document.

    propagationStopped: boolean

    True if stopPropagation() was called on this event.

    readerDocumentEventState: ReaderDocumentEventState

    Describes how the reader document acted on the event.

    readerView: IReaderView

    The ReaderView instance this event is related to.

    relativeClientX: number

    The client X coordinate relative to the window width. Typically a number between 0 and 1.

    relativeClientY: number

    The client Y coordinate relative to the window height. Typically a number between 0 and 1.

    relativeScreenX: number

    The global screen X coordinate relative to the screen width. Typically a number between 0 and 1.

    relativeScreenY: number

    The global screen Y coordinate relative to the screen height. Typically a number between 0 and 1.

    screenX: number

    The X coordinate of the mouse pointer in global (screen) coordinates.

    screenY: number

    The Y coordinate of the mouse pointer in global (screen) coordinates.

    The type of event.

    userGenerated: boolean

    If the event was emitted due to a user generated event.

    Note that if this value is true, the engine event listener might still be called in an untrusted execution context due to proxying through iframes, etc. Use isTrusted() to verify if the current execution context is trusted.

    willEmitDomEvent: boolean

    If true, a native DOM event with the same type as this engine event will also be fired in your app.

    If you are also listening on the corresponding DOM event, use this value to ensure that you are not handling the same event twice.

    For example, when performing a "click" inside an EPUB reader document, the DOM "click" event will not be visible to your app because the document is rendered in an iframe. However, a click on the edge of an EPUB reader document will generate a normal DOM "click" event AND also a Colibrio "click" engine event.

    Methods

    • Stops this event from propagating to listeners on the ReadingSystemEngine instance, if called from a listener added to a ReaderView instance. If the event has already propagated to the ReadingSystemEngine instance, calling this method has no effect.

      Returns void