ZoomCharts Documentation

ZoomCharts.Configuration.BaseMouseEvent

Represents a single pointer. On multitouch, separate event for each pointer will be fired.

Methods

distance: (p: { x: number; y: number; }): number
Parameters
Properties
Return value
Data type: number
isWithinDistance: (current: { pageX: number; pageY: number; timeStamp: number; }, dist: number, maxAge?: number): boolean

Verifies if the original event described by this instance is within a specified distance of the given position.

Parameters

The mouse event/pointer to which this instance is compered

Properties
pageX: number
pageY: number
timeStamp: number
dist: number

The distance, in pixels, non-inclusive, below which the method will return positive

maxAge: number

Time, in milliseconds. If specified, also verifies that the original event did not occur too long ago.

Return value
Data type: boolean
preventDefault: (): void

Properties

altKey: boolean
changedPointerCount: number
consumed: boolean
ctrlKey: boolean
cursor: "default" | "help" | "move" | "pointer" | "progress" | "text" | "wait" | "e-resize" | "ne-resize" | "nw-resize" | "n-resize" | "se-resize" | "sw-resize" | "s-resize" | "w-resize" | "ns-resize" | "crosshair"
defaultPrevented: boolean
dx: number
dy: number
identifier: string
isRightMB: boolean
metaKey: boolean
pageX: number
pageY: number
pressed: boolean
shiftKey: boolean
swipeDown: boolean

only on up event

swipeLeft: boolean

only on up event

swipeRight: boolean

only on up event

swipeSpeed: number
swipeUp: boolean

only on up event

timeStamp: number
touch: boolean
vx: number
vy: number
wheelx: number
wheely: number
X