Documentation

getContext

gets drag-n-drop context object

object getContext();

Returns

objectdnd context

See also

Example

var dnd = webix.DragControl.getContext();
            if (dnd.from.name){ //ignoring non-ui dnd
                var value = dnd.from.getItem(dnd.source[0]).title;
                target.innerHTML=value;

Details

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

  • from - the source object
  • to - the target object
  • source - the id of the dragged item(s)
  • target - the id of the drop target, null for drop on empty space
  • start - the id from which DND was started
Back to top