срабатывает при закрытии ветки
gantt.attachEvent("onTaskClosed", function(id) { alert(`Вы закрыли ветку с id=${id}`); });