locate

gets the id of a task from the specified HTML event

string|number locate(Event e);

Parameters

eEventa native event

Returns

string|numberthe task id

Example

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

See also
Back to top