specifies the text of tooltips that are displayed when the user creates a new dependency link
from | string|number | the id of the source task |
from_start | boolean | true, if the link is being dragged from the start of the source task, false - if from the end of the task |
to | string|number | the id of the target task( 'null' or 'undefined', if the target task isn't specified yet) |
to_start | boolean | true, if the link is being dragged to the start of the target task, false - if to the end of the task |
gantt.templates.drag_link = function(from, from_start, to, to_start) {
const sourceTask = gantt.getTask(from);
let text = `From:<b> ${sourceTask.text}</b> ${(from_start?"Start":"End")}<br/>`;
if(to){
const targetTask = gantt.getTask(to);
text += `To:<b> ${targetTask.text}</b> ${(to_start?"Start":"End")}<br/>`;
}
return text;
};