The above code works if i task resizing : console.log("Resize"); it is getting printed.
But not returning e.startClockHtml;
On task resize i want to show only startClockHtml , How to achieve this ?
I have gantt in PnGanttchart.ts file where columnLines is false and taskResize and taskDrag is implemented successfully. Now I want to change these gantt properties in other class where it have access of gantt component.
new Gantt({
columnLines: false,
features: {
taskResize: {
// Custom tooltip for when a task is dragged
tooltipTemplate: this.onResizeToolTip.bind(this),
},
taskDrag: {
// Custom tooltip for when a task is dragged
tooltipTemplate: this.onResizeToolTip.bind(this),
},
}
});
In PnProjectGanttChart.ts I have PnGanttchart instance
where i used
ganttInstance.columnLines = true; to make columnLines enabled .
When I use
ganttInstance.features.taskResize.tooltipTemplate It gives me error .
Property 'toolTipTemplate' does not exist on type 'TaskResize'.ts(2339)
How to achive taskResize in PnProjectGanttchart (customized tooltip for task Resize) ?
It cannot be changed at runtime, not supported.
You can check feature availability in a tooltip handler, or use switch/case by some attribute and list all required template cases.