跳到主要内容

order_branch

Description

激活 'branch' 模式,允许在同一树级别内垂直重新排序任务

order_branch: string | boolean

Example

gantt.config.order_branch = true;

gantt.init("gantt_here");

Default value: false

Details

本选项允许在保持其树级位置的同时重新排序任务。例如,子任务永远不会成为父任务。

性能提升

如果你的 Gantt 包含大量任务,分支重新排序的默认模式可能会降低性能。 要加速,可以使用 "marker" 模式。

gantt.config.order_branch = "marker";

在此模式下,只重排任务的名称(在按住左键时),Gantt 仅在任务被放置到目标位置时重新渲染(释放按键时)。 与默认模式不同,改变任务位置不会触发 onBeforeTaskMove/onAfterTaskMove 事件。

要防止任务在特定位置被放置,请改用 onBeforeRowDragMove 事件(仅在 "marker" 模式下工作)。

Need help?
Got a question about the documentation? Reach out to our technical support team for help and guidance. For custom component solutions, visit the Services page.