Here are the details:
Suppose there are three tasks in the Gantt chart, where task 1 points to Task 2 and task 2 points to task 3. Now, I, as the user, want to direct Task 1 to task 3, removing the dependencies between task 1 and task 2 and between task 2 and task 3. I tried it and found that I could not delete the connection between tasks. Is it possible that the connection node cannot operate?
Looking forward to reply
Support Forum
You can delete dependencies at any time, options:
Use https://bryntum.com/docs/scheduler/api/Scheduler/feature/DependencyEdit and double click a line
Delete dependency in the task editor (double click a task)
delete dependency in the predecessor or successor columns
Hi,
To achieve that you need to first listen to the double click event on the dependency and then you need to remove it.
Please check these docs link below:
https://bryntum.com/docs/gantt/api/Gantt/data/DependencyStore#function-remove
https://bryntum.com/docs/gantt/api/Gantt/feature/Dependencies#event-dependencyDblClick
Here is how you can achieve it:
- Go inside of your ganttConfig
- add listeners object inside of ganttConfig
- Then add
dependencyDblClick
inside of listeners
Code snippet:
ganttConfig = {
....
listeners : {
dependencyDblClick({ dependency }) {
// remove the dependency
this.dependencyStore.remove(dependency);
}
}
}
Best regards,
Tasnim