getContext
gets drag-n-drop context object
object getContext();
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;
Related samples
Details
The drag-and-drop context can have the following 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 an empty space
- start - the ID from which DND was started
- x_offset - the left offset between the pointer and the dragged element
- y_offset - the top offset between the pointer and the dragged element
See also
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.