drag_link

specifies the text of tooltips that are displayed when the user creates a new dependency link

Parameters

fromstring|numberthe id of the source task
from_startbooleantrue, if the link is being dragged from the start of the source task, false - if
from the end of the task
tostring|numberthe id of the target task( 'null' or 'undefined', if the target task isn't specified yet)
to_startbooleantrue, if the link is being dragged to the start of the target task, false - if
to the end of the task

Example

gantt.templates.drag_link = function(from, from_start, to, to_start) {
    from = gantt.getTask(from);
 
    var text = "From:<b> " +from.text + "</b> " +(from_start?"Start":"End")+"<br/>";
    if(to){
        to = gantt.getTask(to);
        text += "To:<b> " + to.text + "</b> "+ (to_start?"Start":"End")+"<br/>";
    }
    return text;
};

See also
Back to top