Skip to content

$dragMark

called during drag-n-drop, when some item of the component should be marked as an active drop target

function $dragMark(
// a drag-n-drop context
context: WebixDnDContext,
// a native HTML event
ev: Event
): boolean

boolean returning false will prevent a drag operation

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

The drag-and-drop context can have the following properties:

  • from - the source object
  • to - the target object
  • source - the id of dragged item(s)
  • target - the id of the drop target, null for a drop on an empty space
  • start - the id from which drag-and-drop has started

Articles