fires before a drop operation in the Gantt chart
task | object | task object |
context | object | an object with drop context |
boolean | returning false will prevent any drop operation in the chart |
$$("gantt1").attachEvent("onBeforeDrop", function(task, context) {
const name = item.text || "(no title)";
const mode = context.mode;
if (mode == "move") {
webix.message("'" + name + "' has been moved");
}
// ...
});
The context object includes the mode field that stores the drop mode with the following values possible:
Returning false from the event handler will block any drop operation with tasks on the chart (link creation, changing task progress, etc).
$$("gantt1").attachEvent("onBeforeDrop", function(task, context) {
return false;
});
Note the event only fires for chart tasks and is not triggered when tree items are being dropped.