Browse Source

Default duration import & fix scroll event

pull/1/head
Wahyu Ramadhan 1 year ago
parent
commit
d74ed58443
  1. 3
      edit-mode/function/ganttConfig.js
  2. 3
      edit-mode/function/ganttEvent.js

3
edit-mode/function/ganttConfig.js

@ -314,6 +314,9 @@ var allColumns = [
start_date: start,
end_date: end
})
if (todayDuration < 0) {
todayDuration = 0;
}
progress = todayDuration/endDuration * 100
return roundToTwo(progress);
}, resize: true

3
edit-mode/function/ganttEvent.js

@ -159,6 +159,8 @@ gantt.attachEvent("onGanttScroll", function (left, top){
var left_date = gantt.dateFromPos(left)
var right_date = gantt.dateFromPos(left + gantt.$task.offsetWidth)
let taskCount = gantt.getTaskCount();
if (taskCount > 0) {
gantt.config.start_date = gantt.config.start_date || gantt.getState().min_date;
gantt.config.end_date = gantt.config.end_date || gantt.getState().max_date;
@ -180,4 +182,5 @@ gantt.attachEvent("onGanttScroll", function (left, top){
gantt.render()
},20)
}
}
});
Loading…
Cancel
Save