@eigenpal/docx-editor-core/prosemirror/utils/PointerEventHandler

Pointer Event Handler

Centralized input handling for all pointer events. Provides single source of truth for click, drag, and focus management.

Classes (1)

PointerEventHandlerclassSource ↗

PointerEventHandler handles all pointer input for the paged editor. It provides: - Single/double/triple click detection - Drag selection with anchor tracking - Coordinate normalization for zoom - Focus management

declare class PointerEventHandler
MemberTypeSummary
(constructor)Constructs a new instance of the `PointerEventHandler` class
attachAttach event listeners to a container element.
cancelDragCancel any ongoing drag.
detachDetach event listeners from the container.
getDragAnchorGet drag anchor position.
isDraggingGet current drag state.
MULTI_CLICK_DELAY
setPositionResolverUpdate the position resolver reference.

Interfaces (2)

EditorInterfaceinterfaceSource ↗

Interface for the editor that the handler controls.

interface EditorInterface
MemberTypeSummary
focusFocus the editor
getSelectionGet current selection
setSelectionSet selection to a position (collapsed)
setSelectionRangeSet selection range

PointerEventHandlerOptionsinterfaceSource ↗

Options for PointerEventHandler.

interface PointerEventHandlerOptions
MemberTypeSummary
editorEditorInterfaceThe editor to control
onInput?InputEventCallbackCallback for input events
positionResolverClickPositionResolverPosition resolver for click mapping

Type aliases (1)

InputEventCallbacktypeSource ↗

Callback for input events.

type InputEventCallback = (event: {
    type: 'click' | 'doubleClick' | 'tripleClick' | 'dragStart' | 'drag' | 'dragEnd';
    position?: number;
    from?: number;
    to?: number;
}) => void;

On this page