stores the types of available drag-and-drop modes

object drag_mode;


gantt.attachEvent("onBeforeTaskDrag", function(id, mode, e){
    const modes = gantt.config.drag_mode;
    switch (mode){
        case modes.move:
        case modes.resize:
        case modes.progress:

Default value:

{ "resize":"resize", "progress":"progress", "move":"move", "ignore":"ignore" }

You shouldn't change the existing names of the drag modes. Otherwise, that functionality will stop working. But you can add new properties if you want to implement custom behavior. If you want to disable a particular drag mode, it is better to use the drag_move, drag_resize, drag_progress configs.

  • resize - (string) - the mode when the user drags a task bar to change its duration.
  • progress - (string) - the mode when the user drags the progress knob of a task bar.
  • move - (string) - the mode when the user drags a task bar to replace it.
  • ignore - (string) - the service mode which restricts the drag-and-drop action.
Back to top