The onLinkCreated event handler fires when the user finishes creating a link using drag and drop, after the default action specified by linkCreateHandling.
DayPilot.Gantt.onLinkCreated(args)
args.control - DayPilot.Gantt instance that raised the event.args.source - source DayPilot.Task.args.target - target DayPilot.Task.args.type (string) - link type: "StartToStart", "StartToFinish", "FinishToStart", or "FinishToFinish".Use onLinkCreate if you need to validate the new link or cancel the default action before it runs.
const gantt = new DayPilot.Gantt("dp", {
linkCreateHandling: "Update",
onLinkCreated: (args) => {
DayPilot.Modal.alert("Link created, type: " + args.type);
},
// ...
});
gantt.init();
<daypilot-gantt [config]="config"></daypilot-gantt>
config: DayPilot.GanttConfig = {
linkCreateHandling: "Update",
onLinkCreated: args => {
DayPilot.Modal.alert("Link created, type: " + args.type);
},
// ...
};
<DayPilotGantt
linkCreateHandling="Update"
onLinkCreated={onLinkCreated}
{/* ... */}
/>
const onLinkCreated = (args) => {
DayPilot.Modal.alert("Link created, type: " + args.type);
};
<DayPilotGantt linkCreateHandling="Update" @linkCreated="onLinkCreated" <!-- ... --> />
const onLinkCreated = (args) => {
DayPilot.Modal.alert("Link created, type: " + args.type);
};
Link Creation (Drag and Drop) [doc.daypilot.org]
Link Shape [doc.daypilot.org]