drag_link_class

specifies the CSS class that will be applied to the pop-up that appears when a user drags a link

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_class = function(from, from_start, to, to_start) {
    let add = "";
    if(from && to){
        const allowed = gantt.isLinkAllowed(from, to, from_start, to_start);
        add = (allowed ? "gantt_link_allow" : "gantt_link_deny");
    }
    return `gantt_link_tooltip ${add}`;
};

See also
Back to top