Skip to content

chartjs-plugin-zoom / GestureEvent

Interface: GestureEvent ​

Defined in: gestures.ts:13

Normalized gesture event handed to the pan/zoom callbacks. Replaces the former Hammer.js event object; it carries only the fields the plugin consumes, all derived from native PointerEvents.

Properties ​

center ​

ts
center: object;

Defined in: gestures.ts:15

Gesture centroid in client coordinates (midpoint of the active pointers).

x ​

ts
x: number;

y ​

ts
y: number;

deltaX ​

ts
deltaX: number;

Defined in: gestures.ts:17

Cumulative pan offset in pixels since the gesture started.


deltaY ​

ts
deltaY: number;

Defined in: gestures.ts:18


distance ​

ts
distance: number;

Defined in: gestures.ts:20

Straight-line distance the gesture has travelled since it started, in pixels.


pointers ​

ts
pointers: object[];

Defined in: gestures.ts:24

The active pointers, in client coordinates.

clientX ​

ts
clientX: number;

clientY ​

ts
clientY: number;

pointerType ​

ts
pointerType: string;

Defined in: gestures.ts:30

Pointer device type: mouse, touch or pen.


scale ​

ts
scale: number;

Defined in: gestures.ts:22

Cumulative pinch scale relative to the gesture start (1 = unchanged).


srcEvent ​

ts
srcEvent: PointerEvent;

Defined in: gestures.ts:28

The native pointer event that produced this gesture event.


target ​

ts
target: HTMLElement;

Defined in: gestures.ts:26

The canvas the gesture is bound to.

MIT Licensed