fires before the mouse button is pressed and the cursor is moved over a panel
context | object | the drag-n-drop context |
native_event | Event | an HTML event object |
boolean | returning false will prevent dragging of the element |
webix.ui({
view:"dashboard", id:"dashboard",
cells:[
{ view:"panel", x:0, y:0, dx:1, dy:1,
body:{ template:"Draggable"}, drag:true },
{ view:"panel", x:1, y:0, dx:2, dy:1,
body:{ template:"Non-draggable"}, drag:false }
});
$$("dashboard").attachEvent("onBeforeDrag", function(context, native_event){
//returning false will block dragging for some panels
return context.source.config.drag;
});
If you drag multiple items, the event will be called once for the entire batch of items.
The drag-and-drop context can have the following properties: