locate
Description
根据给定的 HTML 事件检索任务的 id
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});
}
});
Related API
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.