locate

根据给定的 HTML 事件检索任务的 id

string | number locate(Event e);
eEvent原生事件对象
string | number任务的标识符

Example

gantt.$container.addEventListener("mouseover", function(event){
    const taskId = gantt.locate(event);
    if(gantt.isTaskExists(taskId)){
       gantt.message({
         id:1,
         text:"Mouse over " + gantt.getTask(taskId).text});
    }
});

See also
Back to top