Interface PointerHandlerOptions

interface PointerHandlerOptions {
    consumeTouch?: boolean;
    onPointerDown: ((event, modifiers) => boolean | void);
    onPointerMoveOrWait?: ((event, modifiers, originalEvent) => void);
    onPointerUp?: ((event, modifiers, originalEvent) => void);
    processTouch?: boolean;
    timerContinuous?: number;
    timerInitial?: number;
}

Properties

consumeTouch?: boolean

If true the touch events will be consumed and not propagated.

Default

true
onPointerDown: ((event, modifiers) => boolean | void)

If returns false then other events will not be fired

Type declaration

    • (event, modifiers): boolean | void
    • Parameters

      Returns boolean | void

onPointerMoveOrWait?: ((event, modifiers, originalEvent) => void)

If the Pointer has moved or it the Pointer was held for a period of timerContinuous.

Type declaration

    • (event, modifiers, originalEvent): void
    • Parameters

      • event: PointerEvent
      • modifiers: PointerModifiers
      • originalEvent: PointerEvent<Element>

      Returns void

onPointerUp?: ((event, modifiers, originalEvent) => void)

Called when Pointer is released. This is different than the regular Pointer up in that it will be called even if the Pointer is released when outside the component.

Type declaration

    • (event, modifiers, originalEvent): void
    • Parameters

      • event: PointerEvent
      • modifiers: PointerModifiers
      • originalEvent: PointerEvent<Element>

      Returns void

processTouch?: boolean

If this is being used for a touch device then this should be true. This will prevent the default touch events from being fired (by calling defaultPrevent during the capture phase).

Default

false
timerContinuous?: number
timerInitial?: number