DragSession
Defined in: src/modules/drag-drop/drag-drop.ts:8
The state of one drag, from press to drop. All points are in the space the consumer passes to DragDrop — client pixels, canvas pixels or world units; the session never converts.
Type Parameters
Section titled “Type Parameters”TPayload
Section titled “TPayload”TPayload
Properties
Section titled “Properties”
readonlygrab:Vec2
Defined in: src/modules/drag-drop/drag-drop.ts:10
Pointer minus the dragged item’s origin at the press: where on the item it was grabbed.
payload
Section titled “payload”
readonlypayload:TPayload
Defined in: src/modules/drag-drop/drag-drop.ts:12
What is being dragged — an entity id, a list of cards, an inventory slot.
pointer
Section titled “pointer”
readonlypointer:Vec2
Defined in: src/modules/drag-drop/drag-drop.ts:14
The latest pointer.
position
Section titled “position”
readonlyposition:Vec2
Defined in: src/modules/drag-drop/drag-drop.ts:16
Where to draw the dragged item’s origin now: pointer − grab.
readonlypress:Vec2
Defined in: src/modules/drag-drop/drag-drop.ts:18
The pointer at the press.
started
Section titled “started”
readonlystarted:boolean
Defined in: src/modules/drag-drop/drag-drop.ts:20
false until the pointer has moved threshold away from the press.