Skip to content

Documentation / @finchart/dom / PointerInteractions

Class: PointerInteractions ​

Defined in: dom/src/pointer.ts:98

Translates mouse/touch input into pan/zoom/crosshair.

Events are received from the document during a drag — that way the drag doesn't break when the pointer leaves the chart, and setPointerCapture, which jsdom lacks, isn't needed.

Implements ​

  • InteractionHandler

Constructors ​

Constructor ​

new PointerInteractions(element, options?): PointerInteractions

Defined in: dom/src/pointer.ts:127

Parameters ​

element ​

HTMLElement

options? ​

PointerInteractionsOptions = {}

Returns ​

PointerInteractions

Methods ​

connect() ​

connect(target): void

Defined in: dom/src/pointer.ts:143

Parameters ​

target ​

InteractionTarget

Returns ​

void

Implementation of ​

InteractionHandler.connect


disconnect() ​

disconnect(): void

Defined in: dom/src/pointer.ts:208

Returns ​

void

Implementation of ​

InteractionHandler.disconnect


handleCrosshair() ​

handleCrosshair(position): void

Defined in: dom/src/pointer.ts:222

Parameters ​

position ​

Point

Returns ​

void

Implementation of ​

InteractionHandler.handleCrosshair


handlePan() ​

handlePan(offset): void

Defined in: dom/src/pointer.ts:214

Parameters ​

offset ​

number

Returns ​

void

Implementation of ​

InteractionHandler.handlePan


handleZoom() ​

handleZoom(factor, center): void

Defined in: dom/src/pointer.ts:218

Parameters ​

factor ​

number

center ​

number

Returns ​

void

Implementation of ​

InteractionHandler.handleZoom