새로운 의존성 링크가 생성될 때 표시되는 tooltip 텍스트를 정의합니다.
from | string|number | 출발 작업의 ID |
from_start | boolean | 출발 작업의 시작 부분에서 링크가 드래그된 경우 true, 끝 부분에서 드래그된 경우 false |
to | string|number | 목표 작업의 ID (목표 작업이 아직 지정되지 않은 경우 'null' 또는 'undefined') |
to_start | boolean | 목표 작업의 시작 부분으로 링크가 드래그된 경우 true, 끝 부분으로 드래그된 경우 false |
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;
};