eachTask

遍历特定任务或整个甘特图的所有子任务

void eachTask(function code, [string | number parent,object master] );
codefunction一个将被调用以处理每个任务的函数。该函数接收一个任务对象作为参数
parentstring | number父任务的ID。如果提供,将只遍历指定父任务的子任务
masterobject在函数内部将用作“this”的对象

Example

gantt.eachTask(function(task){alert(task.text);})

Details

此方法执行一种深度优先树遍历,从左到右访问每个任务。父任务会在其子任务之前被处理。

See also
Back to top