Перейти к основному содержимому

locate

Description​

Возвращает идентификатор задачи из указанного HTML-события

locate: (e: Event) => string | number

Parameters​

  • e - (required) Event - нативное событие

Returns​

  • id - (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});
}
});
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.