The 2D layer · function

endDrag

Finish a drag and report where it landed. Null when no drag was in progress.

Explained in Sprites and tilemaps.

function endDrag(state: PointerState):
import { endDrag } from '@driftengine/ui2d';

Parameters

ParameterTypeDescription
statePointerState

In depth

A null target is an ordinary outcome — a drop on nothing — and is reported rather than suppressed, because a caller often wants to know a drag ended even where it achieved nothing.