fires before an event is being dragged
context | object | an object with drag context |
event | object | HTML event |
boolean | returning false will block drag operations |
$$("scheduler1").attachEvent("onBeforeEventDrag", function(context, e) {
webix.message(`onBeforeEventDrag for <br/>${context.event.text || "(No title)"}`);
const mode = this.getState().mode;
if (mode === "week") {
webix.message("Custom DnD restriction in Week mode", "error");
return false;
}
});
The context object contains the following fields:
Returning false from the event handler will block drag operations in Scheduler.
$$("scheduler1").attachEvent("onBeforeEventDrag", function(context, e) {
return false;
});