findCycles
信息
此功能仅包含在PRO版本中。
Description
返回图表中的所有依赖环路
findCycles: () => any[]
Returns
cycles- (array) - 在甘特图中发现的依赖环路数组
Example
var cycles = gantt.findCycles();
Related samples
Details
注释
该方法需要先激活 auto_scheduling 插件。
每个 cycles 数组元素都是组成一个循环的一组任务和链接。
[
{
tasks: [//参与循环的任务ID],
links: [//参与循环的链接ID]
},
{
tasks: [...],
links: [...]
}
]
请看下面的示例:
- 任务 #3 的 id = 10
- 任务 #4.1 的 id = 12
- 从任务 #3 结束到任务 #4 开始的链接 id = 1
- 从任务 #4.1 结束到任务 #3 开始的链接 id = 2
The gantt.findCycles 方法将返回以下值:
[
{
tasks: ["10", "12"],
links: ["1", "2"]
}
]
Related API
- auto_scheduling
- auto_scheduling_descendant_links
- auto_scheduling_initial
- auto_scheduling_move_projects
- auto_scheduling_project_constraint
- auto_scheduling_strict
- auto_scheduling_use_progress
- isCircularLink
- onAfterAutoSchedule
- onAfterTaskAutoSchedule
- onBeforeAutoSchedule
- onBeforeTaskAutoSchedule
- onAutoScheduleCircularLink
- onCircularLinkError
Related Guides
Change log
- 4.1版本新增
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.