Skip to content

drag

Type Aliases

DragItemOptions

type DragItemOptions: Omit<DragOptions, "bounds" | "transform" | "recomputeBounds"> & object;

Options of a draggable item action.

Extends neodrag options.

Type declaration

flipDuration
flipDuration: number;

Duration of flip animation.

items
items: unknown[];

Array of draggable items.

minSwapDistance?
optional minSwapDistance: number;

Min distance between items swaps.

After doing an item swap, the next swap will be ignored if the distance between the last swap and the current position is less than this value.

See

Neodrag documentation

Defined in

tmp/commons/src/lib/actions/drag.ts:12

Functions

draggableItem()

function draggableItem<Node>(...args): void | ActionReturn<DragItemOptions, Record<never, any>>

Action to make an item in an array of items draggable.

The array will be mutated to update the order.

Options : DragItemOptions.

Type Parameters

Node extends HTMLElement

Parameters

• …args: [Node, DragItemOptions]

Returns

void | ActionReturn<DragItemOptions, Record<never, any>>

Defined in

tmp/commons/src/lib/actions/drag.ts:33