FileDrag

View source

Captures the browser coordinates from a file-drag event.

The constructor copies DragEvent#clientX and DragEvent#clientY into Vector2 position. The resulting event value exposes the coordinates without retaining the browser event.

Examples

const drag = new FileDrag(event)
console.log(drag.position.x, drag.position.y)

Constructor


constructor(event: DragEvent)

View source

Copies the browser event’s DragEvent#clientX and DragEvent#clientY into position.

Parameters

NameDescriptionDefault
event

Browser file-drag event whose coordinates are captured.

—

Properties


position: Vector2

View source

Browser client coordinates copied from DragEvent#clientX and DragEvent#clientY.

Default: ...