displays an additional layer with custom elements for a link in the timeline area
func | function|object | a render function or a config object |
string | a DOM element that will be displayed in the layer |
Available only in PRO Edition
gantt.attachEvent("onGanttReady", function () {
const link_types = ["FS", "SS", "FF", "SF"]
gantt.addLinkLayer(function (link) {
const node = gantt.getLinkNode(link.id);
if (node){
const el = document.createElement('div');
el.className = 'link_layer';
el.style.left = (node.childNodes[2].offsetLeft + 20) + 'px'
el.style.top = (node.childNodes[2].offsetTop - 6) + 'px'
el.innerHTML = link_types[link.type];
return el;
}
return false;
});
});
This functionality is available in the PRO edition only.
Related sample: Gantt. Additional layer with link types