Skip to content

click

Actions that behave like an on click event listener but with additional conditions.

See

clickIfNoDrag

Type Aliases

ClickDragOptions

type ClickDragOptions: object;

Options for the clickIfDrag and clickIfNoDrag action.

Type declaration

onclick()?
optional onclick: (e) => void;
Parameters

e: PointerEvent

Returns

void

threshold?
optional threshold: number;

See

Defined in

tmp/commons/src/lib/actions/click.ts:16

Functions

clickIfDrag()

function clickIfDrag<E>(node, options): ActionReturn<ClickDragOptions>

Action that triggers a callback if the pointer is moved after a pointerdown event.

Type Parameters

E extends HTMLElement

Parameters

node: E

options: ClickDragOptions

Returns

ActionReturn<ClickDragOptions>

Defined in

tmp/commons/src/lib/actions/click.ts:68


clickIfNoDrag()

function clickIfNoDrag<E>(node, options): ActionReturn<ClickDragOptions>

Action that triggers a callback if the pointer is not moved after a pointerdown event.

Type Parameters

E extends HTMLElement

Parameters

node: E

options: ClickDragOptions

Returns

ActionReturn<ClickDragOptions>

Defined in

tmp/commons/src/lib/actions/click.ts:24