iink-ts - v5.0.0
    Preparing search index...

    Class PointerEventGrabber

    Index
    • Applies inputMode: in "auto", the first pen seen switches the grabber to pen only

      Parameters

      • pointerType: string

      Returns boolean

    • Parameters

      • layerCapture: HTMLElement

      Returns void

    • Keeps every event of the gesture on the canvas once the pointer leaves it, until the pointer is released: the page around neither starts a text selection nor reacts to a drag it never saw begin.

      Parameters

      • evt: PointerEvent

      Returns void

    • Parameters

      • evt: MouseEvent

      Returns void

    • Returns void

    • The instant an event was captured, in epoch milliseconds and with sub-millisecond precision.

      Read off the event rather than by calling Date.now() in the handler: under main-thread pressure the browser hands several samples to one pointermove, and a clock read taken while replaying them would stamp them all with the same instant — the recognizer would then see a burst of points captured simultaneously, which is exactly the timing information it uses to segment characters. timeStamp is relative to the page's time origin, so it is shifted back onto the epoch to keep the same reference as creationTime.

      Parameters

      • event: Event

      Returns number

    • Parameters

      • event: Event

      Returns number

    • Parameters

      • event: MouseEvent | TouchEvent

      Returns TPointer

    • getScreenCTM forces the browser to flush pending layout, which gets increasingly costly as the svg grows (more symbols on the canvas). Reuse the last value as long as svg's transform (pan/zoom/resize) hasn't changed.

      Parameters

      • svg: SVGSVGElement

      Returns DOMMatrix | null

    • The svg pointers are mapped into. Every coalesced pointer sample needs it, so the lookup is kept rather than redone per sample; it is redone only once the kept svg has left layerCapture, which is what a renderer that rebuilds its svg does.

      Returns SVGSVGElement | null

    • Parameters

      • evt: PointerEvent

      Returns TPointerInfo

    • Parameters

      • evt: PointerEvent

      Returns void

    • Parameters

      • evt: PointerEvent

      Returns void

    • Parameters

      • evt: PointerEvent

      Returns void

    • Parameters

      • evt: PointerEvent

      Returns void

    • Parameters

      • e: Event

      Returns void

    • Parameters

      • oneFloat: number
      • requestedFloatPrecision: number

      Returns number

    • Returns void

    capturing: boolean = false
    configuration: TGrabberConfiguration
    gestureStartTime: number = 0

    Epoch milliseconds of the gesture currently being captured. Set on pointerdown and read back by every pointer of that gesture, so they all count from the same origin.

    layerCapture: HTMLElement
    onContextMenu?: (info: TPointerInfo) => void
    onPointerDown?: (info: TPointerInfo) => void
    onPointerMove?: (info: TPointerInfo) => void
    onPointerUp?: (info: TPointerInfo) => void
    pointerType?: string