본문으로 건너뛰기

link_description

Description

링크의 "삭제" 확인 창 헤더에 표시될 텍스트를 설정합니다.

link_description: (link: any) => string;

Parameters

  • link - (required) object - 링크 객체

Returns

  • text - (string) - gantt에 렌더링될 html 텍스트

Example

gantt.templates.link_description = function(link){
const from = gantt.getTask(link.source);
const to = gantt.getTask(link.target);
const types = gantt.config.links;

const from_start = link.type == types.start_to_start;
const to_start = link.type == types.finish_to_start ||
link.type == types.start_to_start;
return `From <b>${from.text}</b> ${(from_start?"Start":"End")}<br/>
To <b>${to.text}</b> ${(to_start ? "Start" : "End")}<br/>`;
};