Skip to content

Class: D3PDragEvent ​

Defined in: core/pointer.ts:59

drag and dragend: the pointer, and where the button went down.

Extends ​

Accessors ​

dx ​

Get Signature ​

ts
get dx(): number;

Defined in: core/pointer.ts:75

Distance of the pointer from where the drag started, on x, in pixels.

Returns ​

number


dy ​

Get Signature ​

ts
get dy(): number;

Defined in: core/pointer.ts:79

Distance of the pointer from where the drag started, on y, in pixels.

Returns ​

number


x ​

Get Signature ​

ts
get x(): number;

Defined in: core/pointer.ts:35

X of the pointer, in pixels, in the plot.

Returns ​

number

Inherited from ​

D3PPointerEvent.x


y ​

Get Signature ​

ts
get y(): number;

Defined in: core/pointer.ts:39

Y of the pointer, in pixels, in the plot.

Returns ​

number

Inherited from ​

D3PPointerEvent.y

Constructors ​

Constructor ​

ts
new D3PDragEvent(
   chart, 
   x, 
   y, 
   original, 
   start
): D3PDragEvent;

Defined in: core/pointer.ts:60

Parameters ​

chart ​

D3PChart

The chart the pointer is on.

x ​

number

X of the pointer, in pixels, in the plot.

y ​

number

Y of the pointer, in pixels, in the plot.

original ​

MouseEvent

start ​

D3PViewportPoint

Where the drag started.

Returns ​

D3PDragEvent

Overrides ​

D3PPointerEvent.constructor

Methods ​

memo() ​

ts
memo<T>(
   projector, 
   chart, 
   key, 
   compute
): T;

Defined in: core/projection.ts:55

The value of compute for these arguments: computed once, then kept as long as the event is.

Type Parameters ​

T ​

T

Parameters ​

projector ​

object

chart ​

D3PChart

key ​

unknown

compute ​

() => T

Returns ​

T

Inherited from ​

D3PPointerEvent.memo


snapshot() ​

ts
snapshot(): D3PViewSnapshot;

Defined in: core/pointer.ts:44

Freeze the axes and systems of the chart as they are now.

Returns ​

D3PViewSnapshot

Inherited from ​

D3PPointerEvent.snapshot

Properties ​

chart ​

ts
readonly chart: D3PChart;

Defined in: core/pointer.ts:22

The chart the pointer is on.

Inherited from ​

D3PPointerEvent.chart


original ​

ts
readonly original: MouseEvent;

Defined in: core/pointer.ts:28

The DOM event.

Inherited from ​

D3PPointerEvent.original


point ​

ts
readonly point: D3PViewportPoint;

Defined in: core/pointer.ts:18

The pixel under the pointer, in the inner area of the chart.

Inherited from ​

D3PPointerEvent.point


start ​

ts
readonly start: D3PViewportPoint;

Defined in: core/pointer.ts:69

Where the drag started.