onBeforeLinkDisplay
Description
在甘特图已加载链接后但在显示之前触发
onBeforeLinkDisplay: (id: string | number, link: Link) => boolean;
Parameters
id- (required) string | number - 链接的标识符link- (required) Link - 链接对象
Returns
result- (boolean) - 定义事件的默认行为是否将被触发 (true) 还是取消 (false)
Example
gantt.attachEvent("onBeforeLinkDisplay", function(id, link){
if (link.type == gantt.config.links.finish_to_start){
return true;
}
return false;
});
Details
该事件是可阻塞的。返回 false 将阻止链接显示
Related API
Need help?
Got a question about the documentation? Reach out to our technical support team for help and guidance. For custom component solutions, visit the Services page.