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

getTaskNode

Description​

Возвращает HTML-элемент панели задачи

getTaskNode: (id: string | number) => HTMLElement

Parameters​

  • id - (required) string | number - идентификатор задачи

Returns​

  • node - (HTMLElement) - HTML-элемент панели задачи

Example​

gantt.addTask({
id:10,
text:"Task #5",
start_date:"02-09-2013",
duration:28
}, "project_2");

gantt.getTaskNode(10);//-><div task_id=​"2" className=​"gantt_task_line" ​…​​>​​…​</div>​

Details​

Please note that when a task is repainted, the old DOM element will be discarded and replaced by a new element. This means that any changes you make to the element will be reset after the next repaint.

If you need to modify the appearance of an element, we recommend using templates as they are the preferred method for customizing the look of Gantt elements.

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.