$drag

the method is called when a drag operation is initiated

string $drag(HTMLElement source,Event ev,string pointer);
source
HTMLElementa DOM element on which a dnd action has started ev
Eventa native HTML event pointer
stringdefines what pointer started dnd
stringa text which will be used in a dnd placeholder, returning false or an empty string will block dnd

Related samples

Details

The method is not purposed for direct call! It is an extension point.

You can override it with your own logic, but check drag-n-drop related events first, as they provide a much more convenient way for drag-n-drop handling.

Pointer has two states: "mouse" and "touch".

See also
  • Articles
  • Back to top
    Join Our Forum
    We've retired comments here. Visit our forum for faster technical support, connect with other developers, and share your feedback there.