onBeforeTaskChanged

fires after the user has finished dragging and released the mouse button but before the changes are applied

boolean onBeforeTaskChanged(string|number id,string mode,object task){ ... };

Parameters

idstring|numberthe task id
modestringthe drag-and-drop mode ("resize", "progress", "move", "ignore")
taskobjectthe task object

Returns

booleandefines whether the default action of the event will be triggered (true) or canceled (false)

Example

gantt.attachEvent("onBeforeTaskChanged", function(id, mode, task){
    //any custom logic here
    return true;
});

Details
  • The event is blockable. Return false to cancel the drag operation.
  • The event fires before the onAfterTaskDrag event.
See also
Back to top