diff --git a/edit-mode/function/ganttEvent.js b/edit-mode/function/ganttEvent.js index f81e172..b37debd 100644 --- a/edit-mode/function/ganttEvent.js +++ b/edit-mode/function/ganttEvent.js @@ -55,6 +55,11 @@ gantt.attachEvent("onBeforeTaskUpdate", function(id,new_item){ new_item['progress'] = progress; }); +gantt.attachEvent("onAfterTaskDrag", function(id, mode, e){ + var task = gantt.getTask(id); + task.end_date = gantt.calculateEndDate(task); + gantt.updateTask(id); +}); gantt.attachEvent("onBeforeLinkAdd", function(id,link){ //any custom logic here