Skip to main content

order_branch

Description

Activates the 'branch' mode that allows vertically reordering tasks within the same tree level

order_branch: string | boolean

Example

gantt.config.order_branch = true;

gantt.init("gantt_here");

Default value: false

Details

This option allows reordering tasks, while saving their tree level position. For example, a subtask will never become the parent task.

Increasing performance

If your Gantt contains lots of tasks, the default mode of branch reordering may slow down the performance. To speed it up, you can make use of the "marker" mode.

gantt.config.order_branch = "marker";

In this mode only the name of the task is reordered (on holding the left mouse key) and Gantt is re-rendered only when a task is dropped in the target position (on releasing the key). Unlike the default mode, changing of the task position doesn't involve firing of the onBeforeTaskMove/onAfterTaskMove events.

To prevent dropping of a task in a particular position, use the onBeforeRowDragMove event instead (works only in the "marker" mode).