marker.js 3 Documentation
    Preparing search index...

    Interface MarkerViewEventMap

    Marker view custom event types.

    The MarkerViewEventMap interface defines the events that can be dispatched by the MarkerView component.

    You can listen to these events using the addEventListener method on the MarkerView instance.

    The events can be logically grouped into two categories:

    1. Marker view events (start with view)
    2. Marker events (start with marker).

    The marker view events are related to the overall state of the MarkerView component, while the marker events are related to the individual markers within the view.

    Marker view events receive MarkerViewEventData as their event.detail, while marker events receive MarkerEventData as their event.detail. Both event data types contain a reference to the MarkerView instance and, for marker events, a reference to the specific marker that triggered the event.

    interface MarkerViewEventMap {
        markerclick: CustomEvent<MarkerEventData>;
        markerover: CustomEvent<MarkerEventData>;
        markerpointerdown: CustomEvent<MarkerEventData>;
        markerpointerenter: CustomEvent<MarkerEventData>;
        markerpointerleave: CustomEvent<MarkerEventData>;
        markerpointermove: CustomEvent<MarkerEventData>;
        markerpointerup: CustomEvent<MarkerEventData>;
        viewinit: CustomEvent<MarkerViewEventData>;
        viewrestorestate: CustomEvent<MarkerViewEventData>;
        viewshow: CustomEvent<MarkerViewEventData>;
    }
    Index

    Properties

    markerclick: CustomEvent<MarkerEventData>

    Marker clicked.

    This event is dispatched when a marker within the MarkerView is clicked. It provides access to the clicked marker and the MarkerView instance.

    markerover: CustomEvent<MarkerEventData>

    Marker mouse over.

    This event is dispatched when the mouse pointer hovers over a marker within the MarkerView.

    markerpointerdown: CustomEvent<MarkerEventData>

    Marker pointer down.

    This event is dispatched when a pointer (mouse, touch, etc.) is pressed down on a marker within the MarkerView.

    markerpointerenter: CustomEvent<MarkerEventData>

    Marker pointer enter.

    This event is dispatched when a pointer (mouse, touch, etc.) enters the area of a marker within the MarkerView.

    markerpointerleave: CustomEvent<MarkerEventData>

    Marker pointer leave.

    This event is dispatched when a pointer (mouse, touch, etc.) leaves the area of a marker within the MarkerView.

    markerpointermove: CustomEvent<MarkerEventData>

    Marker pointer move.

    This event is dispatched when a pointer (mouse, touch, etc.) moves while over a marker within the MarkerView.

    markerpointerup: CustomEvent<MarkerEventData>

    Marker pointer up.

    This event is dispatched when a pointer (mouse, touch, etc.) is released after being pressed down on a marker within the MarkerView.

    viewinit: CustomEvent<MarkerViewEventData>

    Viewer initialized.

    This event is dispatched when the MarkerView instance is created and initialized but none of its internal elements have been created yet.

    viewrestorestate: CustomEvent<MarkerViewEventData>

    Viewer state restored.

    This event is dispatched when the MarkerView instance has restored a previously saved state. It indicates that the viewer has loaded markers and annotations from a saved state.

    viewshow: CustomEvent<MarkerViewEventData>

    Viewer shown.

    This event is dispatched when the MarkerView instance is fully initialized, its internal elements are created, and the target image is loaded. It indicates that the viewer is ready to display markers and annotations.