Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "index"

Index

Functions

Const gestureStream

  • Attaches mouse & touch event listeners to given DOM element and returns a stream of custom "gesture" events in the form of tuples:

    [type, {pos, click?, delta?, zoom}]

    The click and delta values are only present if type == GestureType.DRAG. Both (and pos too) are 2-element arrays of [x,y] coordinates.

    The zoom value is always present, but is only updated with wheel events. The value will be constrained to minZoom ... maxZoom interval (provided via options object).

    Note: If using preventDefault and attaching the event stream to document.body, the following event listener options SHOULD be used:

    eventOpts: { passive: false }

    See: https://www.chromestatus.com/features/5093566007214080

    Parameters

    Returns StreamMerge<any, GestureEvent>

Generated using TypeDoc