From 8324a3784159345c3e9835b46ec6dce3f23004c7 Mon Sep 17 00:00:00 2001 From: Wahyu Ramadhan Date: Mon, 15 May 2023 15:36:39 +0700 Subject: [PATCH] Fix drag task (unfinished) --- edit-mode/function/ganttEvent.js | 5 +++++ 1 file changed, 5 insertions(+) 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