Search Docs
Loading...
Skip to content

Type Alias: AssetDragAction

type AssetDragAction = (payload) => void;

Action function that starts a drag of an asset onto the canvas.

Run it in a dragstart handler. It writes the drag data that names the asset, so a drop on the canvas runs asset.drop for it. A browser accepts drag data only inside dragstart, so a custom implementation must write it synchronously.

Parameters#

Parameter Type Description
payload AddImageOptions The dragstart event and the dragged asset

Returns#

void