ui.startDrag

API reference for the ui.startDrag method.

The method has been superseded by startDragToPoint.

Adds the specified element or content to a design at the end of a drag event.

#eventDragStartEvent<E>
Required

A drag start event.

Properties of event
#currentTargetE
Required
#dragDataobject
Required

Element or content to be added to the design at the end of the drag event.

Audio track to be added to the design at the end of a drag event.

#typestring
Required

The type of element.

This must be "audio".

#resolveAudioReffunction
Required

A function that returns a reference (ref) to an audio asset in Canva's backend.

Returns

A Promise that resolves with the following object:

#refAudioRef

A unique identifier that references an audio asset in Canva's backend.

#durationMsnumber
Required

The duration of the audio track, in milliseconds.

#titlestring
Required

A human readable title for the audio track.

Promise<void>