locate

gets the id of a task from the specified HTML event

string|number locate(Event e);
eEventa native event
string|numberthe task id

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