Hi, I want to disable drag-n-drop in my html node. For example, I enabled drag inthe following way: webix.DragControl.addDrag($$(“anim-view-1”).$view). How can I disable it or remove the drag property?
Hello,
You can set onBeforeDragIn and onBeforeDrop event handlers.
For example,
If onBeforeDragIn handler returns false, tree items won’t be dragged:
$$("yourTree").attachEvent("onBeforeDragIn",function(context,e){
if(...){
return false;
}
});
Same approach can be used to disable drop into a view via the onBeforeDrop handler.