DragDropOptions
Defined in: src/modules/drag-drop/drag-drop.ts:31
Options for DragDrop.
Type Parameters
Section titled “Type Parameters”TPayload
Section titled “TPayload”TPayload
TTarget
Section titled “TTarget”TTarget
Properties
Section titled “Properties”accepts
Section titled “accepts”accepts: (
target,payload) =>boolean
Defined in: src/modules/drag-drop/drag-drop.ts:41
Whether target takes payload — the game’s move rule.
Parameters
Section titled “Parameters”target
Section titled “target”TTarget
payload
Section titled “payload”TPayload
Returns
Section titled “Returns”boolean
contains
Section titled “contains”contains: (
target,point) =>boolean
Defined in: src/modules/drag-drop/drag-drop.ts:43
Whether point is over target.
Parameters
Section titled “Parameters”target
Section titled “target”TTarget
Returns
Section titled “Returns”boolean
probe?
Section titled “probe?”
optionalprobe?:DragProbe<TPayload>
Defined in: src/modules/drag-drop/drag-drop.ts:33
Where the drop is tested. Default 'pointer'.
targets
Section titled “targets”targets: () =>
Iterable<TTarget>
Defined in: src/modules/drag-drop/drag-drop.ts:45
Candidate drop targets, highest priority first. Called on every lookup, so it may reflect live state.
Returns
Section titled “Returns”Iterable<TTarget>
threshold?
Section titled “threshold?”
optionalthreshold?:number
Defined in: src/modules/drag-drop/drag-drop.ts:39
How far, in the points’ units, the pointer must move from the press before
the drag starts. Below it, releasing is a click: DragDrop.end
returns null. Default 0 — the drag starts at the press.